In python is there an easy way to tell if something is not a sequence? I tried to just do: if x is not sequence but python did not like that
if x is not sequence
why ask why
try getting a length and if exception return false
def haslength(seq): try: len(seq) except: return False return True