def firstLine(s):
    try:
        i = s.index('\n')
        return s[:i]
    except ValueError:
        return s
Return the first line of the given string
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/zshcomp.py/firstLine