当前位置:网站首页>String sorting
String sorting
2022-04-23 15:40:00 【Ye Ningxia Xin】
describe
Given n A string , Yes, please. n Strings in dictionary order .
Data range : 1≤n≤1000 , The string length satisfies 1≤len≤100
Input description :
Enter the first line as a positive integer n(1≤n≤1000), below n Behavior n A string ( String length ≤100), The string contains only uppercase and lowercase letters .
Output description :
Data output n That's ok , The output is a string in dictionary order .
Example 1
Input :
9 cap to cat card two too up boat boot
Output :
boat boot cap card cat to too two up
n = int(input())
list = []
if 1 <= n <= 1000 :
for i in range(n):
b = input()
if 1 <= len(b) <= 100:
list.append(b)
list.sort()
# for j in list:
# print(j)
print('\n'.join(list))
Python Medium .join() usage _chixujohnny The blog of -CSDN Blog _.join()
版权声明
本文为[Ye Ningxia Xin]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231534071476.html
边栏推荐
- Why disable foreign key constraints
- 一刷312-简单重复set-剑指 Offer 03. 数组中重复的数字(e)
- Pytorch中named_parameters、named_children、named_modules函数
- Treatment of idempotency
- JVM-第2章-类加载子系统(Class Loader Subsystem)
- PHP function
- What if the server is poisoned? How does the server prevent virus intrusion?
- Knn,Kmeans和GMM
- Date date calculation in shell script
- Mysql database explanation (10)
猜你喜欢
随机推荐
考试考试自用
Load Balancer
自主作业智慧农场创新论坛
Node.js ODBC连接PostgreSQL
木木一路走好呀
YML references other variables
Code live collection ▏ software test report template Fan Wen is here
utils.DeprecatedIn35 因升级可能取消,该如何办
cadence SPB17. 4 - Active Class and Subclass
提取不重复的整数
T2 icloud calendar cannot be synchronized
KNN, kmeans and GMM
大型互联网为什么禁止ip直连
Mobile finance (for personal use)
MySQL Cluster Mode and application scenario
【backtrader源码解析18】yahoo.py 代码注释及解析(枯燥,对代码感兴趣,可以参考)
Explanation of redis database (IV) master-slave replication, sentinel and cluster
码住收藏▏软件测试报告模板范文来了
[leetcode daily question] install fence
GFS distributed file system (Theory)









