Question: CODE oFile = open ( ' file . txt ' , ' w ' ) oFile.write ( ' 1 ' ) oFile.write ( ' 2

CODE
oFile = open('file.txt','w')
oFile.write('1')
oFile.write('2')
oFile.write('3')
oFile.close()
tmp =0
iFile = open('file.txt')
for line in iFile:
tmp +=1
iFile.close()
__________________
In the code above, how many times is the line "tmp +=1" executued?

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!