python check for iterable code example
Example: python check if variable is iterable
from collections import Iterable
def iterable(obj):
return isinstance(obj, Iterable)
from collections import Iterable
def iterable(obj):
return isinstance(obj, Iterable)