n = int(input())
l = []
for i in range(n):
b = input()
l.append(b)
c = sorted(l)
for i in c:
print(i)
#注:利用sorted()函数就可以对列表里的单词进行字典序排列
l = []
for i in range(n):
b = input()
l.append(b)
c = sorted(l)
for i in c:
print(i)
#注:利用sorted()函数就可以对列表里的单词进行字典序排列
我已经通过这道题!
https://gw-c.nowcoder.com/api/sparta/jump/link?link=https%3A%2F%2Fwww.nowcoder.com%2FquestionTerminal%2F5af18ba2eb45443aa91a11e848aa6723
全部评论
相关推荐