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

📅  最后修改于: 2022-03-11 14:45:43.126000             🧑  作者: 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])