I open a file using a python programme.
file = open('test.txt', 'r')
Then I set a variable:
data = file.read()
And another one:
data2 = file.readlines()
The data variable should be a string and data2 a list. Printing data works fine, but when I try to print data2, I get an empty list. Why does it work like that? Why does setting data iterfere with data2?