Source Code
f=open("demo.txt")
str=f.read()
L=str.split()
count_word=0
for i in L:
count_word=count_word+1
print(count_word)
f.close()
OUTPUT
File : This is python programming and PHP programming.
7
Source Code
f=open("demo.txt")
str=f.read()
L=str.split()
count_word=0
for i in L:
count_word=count_word+1
print(count_word)
f.close()
OUTPUT
File : This is python programming and PHP programming.
7
Hello, my name is G Krishna. I'm Creating this blog for the students who are beginners.
Learn More →
No comments:
Post a Comment