题解 | #字符串排序#

字符串排序

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

#使用数组保存字符串,sort函数直接排序
# import sys
while True:
    try:
        str_list = []
        num = int(input())
        for i in range(num):
            str_list.append(input())
        str_list.sort()
        for s in str_list:
            print(s)
    except:
        #print(sys.exc_info())
        break












全部评论

相关推荐

漂亮的海豚在炒股:把西电加粗
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务