Computer Science, asked by himanshukumar4744, 4 months ago

Differentiate between read ( ) and readlines ( ) with examples in python

Answers

Answered by RuwaisnZaid
1

Explanation:

READ()

READ THE CHARACTER AT A TIME

EG: SUPPOSE YOU HAVE TO PRINT ALL THE TEXT FILE IN A TERMINAL YOU WILL USE READ()

TO GET THIS:

READLINE()

THIS FUNCTION READ THE FIRST LINE ATA TIME

EG: SUPPOSED YOU HAVE TO PRINT ONLY FIRST OR SECOND LINE YOU WILL USE THIS FUNCTION

*MARK ME AS BRAINLY

Answered by neharika20
0

hey mate .... refer to attachment ...

Attachments:
Similar questions