python
Published on January 26, 2024By DeveloperBreeze
# Define a list
my_list = [10, 20, 30, 40, 50]
# Iterate over the list using enumerate
for index, value in enumerate(my_list):
print(f'Index {index}: {value}')
# Define a list
my_list = [10, 20, 30, 40, 50]
# Iterate over the list using enumerate
for index, value in enumerate(my_list):
print(f'Index {index}: {value}')
Comments
Please log in to leave a comment.