thistuple = ("apple", "banana", "cherry")
print(thistuple)
print(type(thistuple))
for x in thistuple:
print(x)
print("==============================================")
thistuple = ("apple", "banana", "cherry")
for i in range(len(thistuple)):
print(thistuple[i])
print("+++++++++++++++++++Using a While Loop++++++++++++++++++++++++++")
thistuple = ("apple", "banana", "cherry")
i = 0
while i < len(thistuple):
print(thistuple[i])
i = i + 1
print(thistuple)
print(type(thistuple))
for x in thistuple:
print(x)
print("==============================================")
thistuple = ("apple", "banana", "cherry")
for i in range(len(thistuple)):
print(thistuple[i])
print("+++++++++++++++++++Using a While Loop++++++++++++++++++++++++++")
thistuple = ("apple", "banana", "cherry")
i = 0
while i < len(thistuple):
print(thistuple[i])
i = i + 1
OUTPUT:
('apple', 'banana', 'cherry')
<class 'tuple'>
apple
banana
cherry
==============================================
apple
banana
cherry
+++++++++++++++++++Using a While Loop++++++++++++++++++++++++++
apple
banana
cherry