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  Java code snippet - How does devision works ?

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.