Chongqing University of Posts and Telecommunications Python Homework 3. Reordering Strings ---- (The third homework)

Article Directory


Original title

Insert picture description here


Code

str = list(input());ret = []
for i in str:
    if i not in ret:ret+=i
ret.sort();print(''.join(ret))

Guess you like

Origin blog.csdn.net/qq_37500516/article/details/115004076