📜  在列表中查找项目的索引python代码示例

📅  最后修改于: 2022-03-11 14:46:55.558000             🧑  作者: Mango

代码示例2
#Example List
list = ['apples', 'bannas', 'grapes']
#Use Known Entites In The List To Find The Index Of An Unknown Object
Index_Number_For_Bannas = list.index('apples')
#Print The Object
print(list[Index_Number_For_Bannas])