Question: Write a program to read a text stored in the text file input.txt then create a list words of all words in the text file.

 Write a program to read a text stored in the text

Write a program to read a text stored in the text file input.txt then create a list words of all words in the text file. The text file contains the text: Geometry enlightens the intellect and sets one's mind right - Ibn Khaldun To answer the question, drag and drop the statements (below) to their correct position in the code (above). infile = open("input.txt", 'r') print(words) line = line.rsplit() words +=line infile: words=0 for line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!