Skip to content

Python code snippet – How to get index in for loop?

for index, item in enumerate(items):
    print(index, item)
See also  How to check where function defined in PHP?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.