Q. What is the difference between readline() and readlines() function?


Answer =

The readline() function reads from a file in read mode and returns the next line in the file or a blank string if there are no more lines. (The returned data is of string type.)
The readlines() function also reads from a file in read mode and returns a list of all lines in the file. (The returned data is of list type.)

6 Comments

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

  1. looks like your name is inspired from physicswallah

    ReplyDelete
  2. physica wallah ka name har jagay h
    Love your Alakh sir

    ReplyDelete
    Replies
    1. I also Love Alakh sir,
      but this website is not link with Physics Wallah.

      Delete
  3. your notes are quite amazing keep it up i think one day you will see sky...

    ReplyDelete
  4. Kl Mera paper hai or main aapke notes dh rhi hoo thanks

    ReplyDelete

Post a Comment

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

Previous Post Next Post