def strip_quotes(s, qchar='"'):
    """Return string s with any enclosing quotes removed.
    They are only removed if both are present."""
    if len(s) > 1:
        if s[0] == qchar and s[-1] == qchar:
            s = s[1:-1]
    return s