# this is how computer works when we run for loop
# the same can be done using for loop as
# for char in string :
#       print(char)
# creating an iterator and next function is used to move the iterator
string = "123456789"
my_iterator = iter(string)
print(my_iterator)
print(next(my_iterator))
print(next(my_iterator))
print(next(my_iterator))
print(next(my_iterator))
print(next(my_iterator))
print(next(my_iterator))
print(next(my_iterator))
print(next(my_iterator))
print(next(my_iterator))
