首先获取用户输入的列表,然后对列表进行去重与排序
"""
首先获取用户输入的列表,然后对列表进行去重与排序
"""
print('please enter the elements of list, separate them by comma.')
string = input('please enter the elements: ')
string_deal = string.split(',')
answer = set() # 去重
for number in string_deal:
if number.isdigit(): # make it stronger
answer.add(number)
result = [] # 排序 or result = list()
for i in answer:
result.append