Skip to content

Python code snippet – How to find the position in a list ?

lst = [4, 6, 5]
lst.index(6) # will return 1
See also  Python code snippet - How to automatically restart flask sever?

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.