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}')

Comments

Please log in to leave a comment.

Continue Reading:

Sort a List

Published on January 26, 2024

python

Remove Duplicates from a List

Published on January 26, 2024

python

Calculate Average of Numbers

Published on January 26, 2024

python

Find Maximum Value in a List

Published on January 26, 2024

python

Java: How to Sort a List

Published on August 12, 2024

java