def dequote(string):
 if ((string.startswith('"') and string.endswith('"')) or (string.startswith("'") and string.endswith("'"))):
  return string[1:(-1)]
 else:
  return string

def dequote ( string ) : if ( ( string . startswith ( '"' ) and string . endswith ( '"' ) ) or ( string . startswith ( "'" ) and string . endswith ( "'" ) ) ) : return string [ 1 : ( - 1 ) ] else : return string
takes string which may or may not be quoted and unquotes it .