write a program
To count
count the number
of words in file "poem. txt" ?
Answers
Answered by
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