Explicit is better than implicit, so I prefer:
with open("file.txt", "r") as f:
data = f.readlines()
But, when it is possible, the most pythonic is to use the file iterator directly, without loading all the content to memory, e.g.:
with open("file.txt", "r") as f:
for line in f:
my_function(line)