How would you get only the first line of a file as a string with Python?
This should do it:
f = open('myfile.txt') first = f.readline()