题解 | #字符串排序#

字符串排序

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

Remember to convert input into int type for n.

No while loop needed in this one.

try:
    n = int(input())
    l = []
    for i in range(0,n):
        l.append(str(input()))
    l = sorted(l)
    for i in range(0,n):
        print(l[i])
except EOFError:
    print(0)
全部评论

相关推荐

评论
点赞
收藏
分享
牛客网
牛客企业服务