Q. Given a file 'mine.txt' as shown below:

 

    I am Line 1

 

    I am Line 3

 

What would be the output of the following code?

 

print (file("mine.txt").readlines())

 

Answer =

 

It will produce an error that ‘NameError: name 'file' is not defined’

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post