Computer Science, asked by azmathunnisa1833, 10 months ago

Read a text file line by line and display each word separated by a #

Answers

Answered by amuthamcablevkl
14

Answer:

file=open("C:\python programs\\test.txt","r")

doc=file.readlines()

for i in doc:

  words=i.split()

  for a in words:

      print(a+"#")

file.close()

Explanation:

plz mark me as brainest

Similar questions