Question: with open ( frankenstien . txt , r ) as input _ file: book _ text = input _ file.readlines (
with openfrankenstientxtr as inputfile:
booktext inputfile.readlines
printbooktext
Why does the code above say printbooktext instead of printbooktext
Text files require printbooktext while CSV files require printbooktext
Both printbooktext and printbooktext print the same thing.
Using printbooktext will cause an error.
The variable booktext is a list of strings. If you print booktext, it will print the entirety of the list including square brackets and quotes. Printing text will print just the text, no special characters.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
