def split_on_newlines(s):
    '\n    Splits s on all of the three newline sequences: "\r\n", "\r", or "\n".\n    '
    res = []
    for x in s.split('\r\n'):
        for y in x.split('\r'):
            res.extend(y.split('\n'))
    return res
