QUESTION IMAGE
Question
question # 3
dropdown
you are opening a file to read its contents. complete the code.
import csv
infile = open(\fruit.txt\,
\)
myreader = csv
for item in myreader:
print(item)
infile.close()
Step1: Recall CSV - reading in Python
In Python, when using the csv module to read a file, the reader function is used to create a reader object for reading the contents of the file.
Step2: Fill in the code
The missing part in the code myReader = csv<missing>(inFile) should be reader to create a csv.reader object for reading the opened file inFile.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
reader