Computer Science · Python File Handling
A text file named message.txt contains the following lines: Good morning. I will be there on time. Consider the following Python code: F = open('message.txt') S1 = F.read(3) S2 = F.readline(4) S3 = F.read(4) print(S1, S3, sep='@') Which of the following will be the correct output of the above Python code?
- 1EOFError
- 2ValueError
- 3Goo@i wi
- 4Goo@mnin✓
Correct answer
Goo@mnin
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Python File Handling?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Python File Handling