题解 | #字符串排序#

字符串排序

http://www.nowcoder.com/practice/5af18ba2eb45443aa91a11e848aa6723

简单,python的列表sort函数,可以实现按照字典序排序
n=int(input())
list1=[]
for i in range(n):
    s=input()
    list1.append(s)
list1.sort()
for i in list1:
    print(i)

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务