What is the difference between readline and readlines function in python 3 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the difference between readline and readlines function in python 3

31st May 2020, 9:02 AM
Aman Yadav
Aman Yadav - avatar
1 Answer
+ 2
readline basically read single line from file & return as string where readlines reads all contents of the file & return data in lists of strings
31st May 2020, 9:10 AM
Sudarshan Rai
Sudarshan Rai - avatar