Question: write python code : You have an if ( line [ 0 : 3 ] = = URL ) to check if the line is

write python code : You have an if(line[0:3]==URL) to check if the line is a URL
1. Under the if statement, add an else: statement
The else will be for all the words that arent the URL line
The else statement is still inside of the for line in file:
2. Inside the else statement:
1. Use line.split() to split each line of the file and store it into a variable
called words
2. Since words is a list of words, we can do for word in words:
1.word will become every single word
2. print(word)

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 Programming Questions!