QUESTION IMAGE
Question
your file, pets.txt, contains the type of pet, weight, and age on each line. an example line is below: dog, 30, 6 finish the code to read the file and print the contents. import csv infile = open(pets.txt,r) myreader = for item in myreader: print(item)
Step1: Use csv.reader to create reader object
myReader = csv.reader(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
myReader = csv.reader(inFile)