L1=len(list1) #列表list1的长度
list2=list(set(list1)) #可以用set,直接去掉重复的元素
list2.sort(reverse=False) #将列表由小到大排序
import numpy as np
array = [1, 2, 1, 3, 4, 5, 1]
item = 1
np_array = np.array(array)
item_index = np.where(np_array==item)
print (item_index
-------->>>>>Out: (arr)ay([0, 2, 6], dtype=int64),)