What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-20 22:53:05
how to get index in python
# alphabets list alphabets = ['a', 'e', 'i', 'o', 'g', 'l', 'i', 'u'] # index of 'i' in alphabets index = alphabets.index('i') # 2 print('The index of i:', index) # 'i' after the 4th index is searched index = alphabets.index('i', 4) # 6 print('The i... Add solution