Skip to content

Python code snippet – How to find item in list without indexnig?

>>> ["foo", "bar", "baz"].index("bar")
1
See also  Python code snippet - How to define dtype of each column before actually reading csv file?

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.