sajad torkamani
On this page

Example

fruits = ["apple", "banana", "cherry", "date"]

for index, fruit in enumerate(fruits):
    print(index, fruit)

Output

0 apple
1 banana
2 cherry
3 date
Tagged: Python

Leave a comment

Your email address will not be published. Required fields are marked *