python3 数组去重 list(set(gIDList)) gIDList = [2, 2, 3, 4, 2, 8] print('gIDList',gIDList) print('list(set(gIDList))',list(set(gIDList))) 运行结果: