PYTHON QUESTION 3 MULTIPLE CHOICE years = [] with open("years.txt") as file: for line in file: line = line.replace("\n", "") years.append(int(line)) # converts str to int print(years) A. Refer to the...


PYTHON



QUESTION 3 MULTIPLE CHOICE




years = []




with open("years.txt") as file:




    for line in file:




        line = line.replace("\n", "")




        years.append(int(line))             # converts str to int




print(years)



A. Refer to the code above, what does the program do?




















a.



Reading the items in a list from a file with \n



c.



Reading the lines in a file from a list



b.



How to read file into a list and print in lines



d.



Reading the items in a list from a file




Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here