LogiQuest
Back to File Handling
3

What is the output of the following code?

import io
f = io.StringIO('line1\nline2\n')
print(len(f.readlines()))
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.