Question: Consider the program below. 1 data _ file = open ( ' input . txt ' ) 2 file _ text = data _ file.read

Consider the program below.
1 data_file = open('input.txt')
2 file_text = data_file.read()
3 file_lines = file_text.split('
')
4 for line in file_lines[1:]:
5 items = line.split(',')
6 if (len(items)>1):
7 print(items[1])
The program operates on the text file below:
MFG,2005-2009,2010-2014,2015-2019
Mazda,34,56,76
BMW,23,22,17
Honda,66,80,76
Ford,45,70,73
How many lines will the program output?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!