A text file named message.txt contains the following lines: Good morning. I…
PYQ EMRS TGT/PGT (ESSE) 2025
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?
- A.
Goo@rnin
- B.
Goo@I wi
- C.
ValueError
- D.
EOFError
Attempted by 353 students.
Sign up free to check your answer
Sign up freeLoading lesson…

