Project | Word Count using Jupyter Notebook Python

 Project | Word Count using Jupyter Notebook Python


In this blog, we are going to learn how to make a program that can count words in text files or strings that you have given in input using jupyter notebook python. This project is for beginner level and fun to do i hope you guys will love it




Step 1 : import the save all you text in notepad and save it whatever name you want but make sure extension is txt

Step2 :

t = open('text.txt',"r") # file adress and file name . r represent read the file so all our data will going to store in variable called t

count = [] #create a empty list in which we store our text

#this will split our data string and store in our count variable
for x in t:
    print(x)
    count.append(x.split(''))

len(count)  # this will print out the no. of words out txt file contains .


that's all this is a very simple project for beginner i hope you love it while doing it . Feel free to ask doubt and query in comments



Post a Comment

0 Comments