I'm trying to implement the next line:
with open('.\numbers.txt', 'r') as f:
The \n
in the path is being recognized as the new line
special character.
You can use the raw string by prefixing the string with r
print(r'.\numbers.txt')
Or escape the backslashes with \\
print('.\\numbers.txt')