iterating over tuples in python
thistuple = ("apple", "banana", "cherry")
for x in thistuple:
print(x)
iterating over tuples in python
thistuple = ("apple", "banana", "cherry")
for x in thistuple:
print(x)
how to iterate tuple in python
#Loop Through the Index Numbers
#You can also loop through the tuple items by referring to their index number.
#Use the range() and len() functions to create a suitable iterable.
#Print all items by referring to their index number:
thistuple = ("apple", "banana", "cherry")
for i in range(len(thistuple)):
print(thistuple[i])
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us