What Will Be The Output Of The Following Python Codep Pre #1025

What will be the output of the following Python code?</p> <pre><code class="language-python" line="1"> fo = open("foo.txt", "rw+") print "Name of the file: ", fo.name # Assuming file has following 5 lines # This is 1st line # This is 2nd line # This is 3rd line # This is 4th line # This is 5th line for index in range(5): line = fo.next() print "Line No %d - %s" % (index, line) # Close opened file fo.close() </code></pre>

Online Quiz This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Python Files - Python Files - Quiz No.2.


Similar question(s) are as followings:



Online Quizzes of gs109 Python

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background