ShriRam Changed status to publish August 18, 2023
l1 = [“eat”, “sleep”, “repeat”]
# printing the tuples in object directly
for ele in enumerate(l1):
print(ele)
for i,ele in enumerate(l1):
print(i,ele)
nums=[5,15,35,8,98]
for num_index,num_val in enumerate(nums):
print(num_index,num_val)
ShriRam Changed status to publish August 18, 2023