Untitled
unknown
plain_text
a year ago
256 B
4
Indexable
# Define the list my_list = [5, 10, 15, 20, 25, 30] # Define the item to find item = 15 # Use the 'index' method to find the index of the item index = my_list.index(item) # Print the index of the item print("The index of", item, "in my_list is:", index)
Editor is loading...
Leave a Comment