题解 | #字符串排序#

字符串排序

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

n=int(input())
list=[]
#难点在于给定长度输入字符列表
for _ in range(n):
    list.append(input())

list_sorted=sorted(list)
#竖着输出字符列表时要用'\n'.join()
print('\n'.join(list_sorted))

全部评论

相关推荐

积极的小学生不要香菜:你才沟通多少,没500不要说难
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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