1 to 10

Report a typo

We have a file numbers.txt that contains a single line with the number 1. Suppose, we run the following code:

file = open('numbers.txt', 'a')

for i in range(2, 11):
    file.write(str(i) + ' ')

file.close()

How many lines will numbers.txt contain after this?

Enter a number
___

Create a free account to access the full topic