def _repr_strip ( mystring ) : r = repr ( mystring ) if r . startswith ( "'" ) and r . endswith ( "'" ) : return r [ 1 : - 1 ] else : return r
python remove quotation marks repr
Returns the string without any initial or final quotes .
def _repr_strip(mystring):
    """
    Returns the string without any initial or final quotes.
    """
    r = repr(mystring)
    if r.startswith("'") and r.endswith("'"):
        return r[1:-1]
    else:
        return r