输入一个列表,再输入你的目标target用enumerate对列表进行索引,输入目标对应的索引列表例如,input num=[1,2,3],target=3output [0,1]
target=3 for i,j in enumerate ([1,2,3]): if j==3: print(i)
我的中英文可能没分,如果报错,检查下是否是英文状态