I have a text file like this:
there is no separation mark.
When I use these lines of code, it returns nothing:
with open('input.txt','r') as f:
contents = f.read()
print(contents)
How can I save its elements in a python list or array?
>Solution :
try this:
with open("./input.txt",'r') as file:
for line in file:
print(line)
