给定这些子列表
lst=[['a', 'b', 'c', 'd', 'e'], ['f', 'g', 'h']]
我试图找到其元素的位置,例如,字母“a”位于 0,0 但这一行
print(lst.index('a'))
相反会产生以下错误: ValueError: 'a' is not in list
python nested-lists sublist
nested-lists ×1
python ×1
sublist ×1