Reading first line from file in Python

f = open("data.txt")
print(f.readline())
f.close()