Python题解 | #字符串排序#
字符串排序
https://www.nowcoder.com/practice/5af18ba2eb45443aa91a11e848aa6723
import sys
n = int(input())
list1 = []
for i in range(n):
s = input()
list1.append(s)
list1.sort(reverse=False)
for j in list1:
print(j)
字符串排序
https://www.nowcoder.com/practice/5af18ba2eb45443aa91a11e848aa6723
import sys
n = int(input())
list1 = []
for i in range(n):
s = input()
list1.append(s)
list1.sort(reverse=False)
for j in list1:
print(j)
相关推荐