可以利用collections庫的Counter方法,先計數並生成壹個count_lst的字典,
然後遍歷壹次lst, count_lst值==1的第壹個數輸出,跳出循環即可
lst?=?[2,2,4,1,5,7]
count_lst?=?Counter(lst)
for?i?in?lst:
if?count_lst.has_key(i)?and?count_lst[i]==1:
print?i
break