Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started