def _strip_trailing_newline(s):

    if s == "":
        return s
    else:
        return s[:-1] if s[-1] == '\n' else s
Returns a modified version of the string with the last character
dataset/ETHPy150Open shopkeep/shpkpr/shpkpr/files.py/_strip_trailing_newline