How would you get only the first line of a file as a string with Python?
first_line = next(open(filename))
infile = open('filename.txt', 'r') firstLine = infile.readline()