5.
How can you read a single line from a file in Python?

6.
What is the purpose of the seek() method in file handling?

7.
How can you read the entire contents of a file line by line in Python?

8.
What is the output of the following code:
with open('data.txt', 'a') as file:
file.write('Appended line.')

with open('data.txt', 'r') as file:
content = file.read()
print(content)

9.
How can you create a new file in Python if it doesn't exist?

10.
To open a file c:\scores.txt for reading, we use . . . . . . . .