def remove_and_return_linefeed(src):
    '\n        remove_and_return_linefeed()\n        ________________________________________________________________________\n\n        Remove the linefeed characters from the end of (str)src.\n        This function recognizes three kinds of linefeed characters :\n        ▪ the Linux one (\n)\n        ▪ the Windows one (\r\n)\n        ▪ the ancient OSX one (\r)\n        ________________________________________________________________________\n\n        PARAMETER : (str)src, the source string to be cut\n\n        RETURNED VALUE : ((str)the reduced source string,\n                          (str)the linefeed characters)\n    '
    if src.endswith('\r\n'):
        return src[:-2], '\r\n'
    elif src.endswith('\n'):
        return src[:-1], '\n'
    elif src.endswith('\r'):
        return src[:-1], '\r'
    else:
        return src, ''
