Computer Science, asked by sujeeth07, 7 months ago

write a program
To count
count the number
of words in file "poem. txt" ?​

Answers

Answered by ykumar34
0

Answer:

f=open('poem.txt')

data=f.read()

data=data.split()

print(len(data))   #number of words in the file

Explanation:

f=open('poem.txt')

data=f.read()

data=data.split()

print(len(data))   #number of words in the file

Similar questions