http://noi.openjudge.cn/ch0110/10/
"""
1.10 编程基础之简单排序 10 单词排序
http://noi.openjudge.cn/ch0110/10/
Python字符串去重
https://www.jianshu.com/p/b9162f389b5c
https://www.cnblogs.com/zhenghiber/p/15110871.html
Python:对输入的单词进行字典序排序输出
https://www.cnblogs.com/JodieRao/p/12635910.html
Python 程序按字母顺序对单词进行排序
https://www.nhooo.com/python/python-examples-alphabetical-order.html
"""
my_str = input()
words = my_str.split()
dedup_list = []
for word in words:
if not word in dedup_list:
dedup_list.append(word)
# 列表排序
dedup_list.sort()
for word in dedup_list:
print(word)
参考:
Python字符串去重
https://www.jianshu.com/p/b9162f389b5c
Python:对输入的单词进行字典序排序输出
https://www.cnblogs.com/JodieRao/p/12635910.html
Python 程序按字母顺序对单词进行排序
https://www.nhooo.com/python/python-examples-alphabetical-order.html