Source Code:
(back to article)
def is_iterable(obj): try: iter(obj) return True except TypeError: return False print(is_iterable(2))
Result:
Report an issue