Answers for "python is string iterable?"

2

check iterable python

hasattr(myObj, '__iter__')
Posted by: Guest on July-03-2021
0

what is iterator in python

An iterator is an object that can be iterated upon, meaning that you can traverse through all the values.
#EXAMPLE OF ITERATOR
nums=[2,3,4,5,6,7]
it=iter(nums)
print(it.__next__())
for i in it:
  print(i)
Posted by: Guest on September-23-2020

Code answers related to "python is string iterable?"

Python Answers by Framework

Browse Popular Code Answers by Language