当前位置:网站首页>openjudge:过滤多余的空格
openjudge:过滤多余的空格
2022-07-28 05:18:00 【编程器系统】
描述
一个句子中也许有多个连续空格,过滤掉多余的空格,只留下一个空格。
输入
一行,一个字符串(长度不超过200),句子的头和尾都没有空格。
输出
过滤之后的句子。
样例输入
Hello world.This is c language.
样例输出
Hello world.This is c language.
代码
s = input().split()
for i in s:
print(i, end=" ")边栏推荐
猜你喜欢

The solution after the samesite by default cookies of Chrome browser 91 version are removed, and the solution that cross domain post requests in chrome cannot carry cookies

论文模型主图范例

Flask Development & get/post request

7.<tag-字符串和API的取舍>补充: 剑指 Offer 05. 替换空格

集合框架的操作使用

First acquaintance with C language (2)

2022 summer practice (PowerDesigner tutorial learning record) (first week)

BigDecimal rounds and retains two decimal places

mysql的日期与时间函数,varchar与date相互转换

Bean的作用域、执行流程、生命周期
随机推荐
Lamda gets the current number of cycles, atomicinteger
regular expression
2021csdn blog star selection, mutual investment
论文模型主图范例
2022 summer practice (first week)
Scope, execution process and life cycle of bean
SSLError
ResNet结构对比
ssm项目快速搭建项目配置文件
MySQL practice 45 lectures
Operation and use of collection framework
Google browser cannot open localhost:3000. If you open localhost, you will jump to the test address
Mysql处理遗留数据样例
科研论文写作方法:在方法部分添加分析和讨论说明自己的贡献和不同
PyTorch 使用 MaxPool 实现图像的膨胀和腐蚀
Test Development - UI testing in automated testing
架构设计思考合集
Mabtis(一)框架的基本使用
docker 部署 mysql5.7.35
SSM project quick build project configuration file