how to check if variable is iterable python 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)