nowcoder-python/NP/NP25.py

16 lines
283 B
Python
Raw Normal View History

2022-10-26 15:07:20 +08:00
#!/usr/bin/env python3
# @author 轩辕龙儿
# @date 2022/10/26
# @file NP25.py
def solution():
my_list = ["P", "y", "t", "h", "o", "n"]
print(sorted(my_list))
print(my_list)
my_list.sort(reverse=True)
print(my_list)
if __name__ == "__main__":
solution()