<<<<<<< HEAD
To write a python program for getting the word count from a text.
PC Anaconda - Python 3.7
Start
Declare a variable count equal to 0.
Open the required text file in read mode as text.(any name can be used).
Loop until variable i in file text.
Declare variable word = i.split().
Process count+=len(word) End loop
Print the value of count, which has the number of words in the file
Stop
num_words =0
with open('text.txt','r') as file1:
for i in file1:
word =i.split()
num_words += len(word)
print("Number of words={}".format(num_words))