Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check iterable python

try:
    iterator = iter(the_element)
except TypeError:
    # not iterable
else:
    # iterable

# for obj in iterator:
#     pass
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #iterable #python
ADD COMMENT
Topic
Name
7+2 =