How to find the index of a value in Python

Posted on: January 21st, 2023
By: Tadeo Martinez

list = ["one","two","three","four"]

print(list.index("one"))

# Output
# 0

Have any questions or comments? Write them below!


Leave a Reply

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