当前位置:网站首页>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=" ")边栏推荐
- Multi module packaging: package: XXX does not exist
- First acquaintance with C language (1)
- SimpleDateFormat线程不安全和DateTimeFormatter线程安全
- Feignclient calls the get method and reports an error resultvo{result= unknown exception. Exception details: request method 'post' not supported
- Database date types are all 0
- 测试开发---自动化测试中的UI测试
- What are the methods of array objects in Es5 and what are the new methods in ES6
- VMware Workstation 与 Device/Credential Guard 不兼容。禁用 Device/Credential Guard
- Mybats foreach multi select query, index loop, and cancel the and/or tag
- List<Long>,List<Integer>互相转换
猜你喜欢

VMware Workstation 与 Device/Credential Guard 不兼容。禁用 Device/Credential Guard

Redis' bloom filter

repackag failed: Unable to find main class

FusionGAN代码学习(一)

Digital twin solutions inject new momentum into the construction of chemical parks

多线程进阶:volatile的作用以及实现原理

regular expression

visio如何精确控制图形的大小和位置及角度

restFul接口使用个人总结

repackag failed: Unable to find main class
随机推荐
SimpleDateFormat线程不安全和DateTimeFormatter线程安全
How about ink cloud?
多线程进阶:volatile的作用以及实现原理
List < long >, list < integer > convert each other
BeanUtils.copyProperties无法复制不同List集合问题解决 Lists.transform函数
SSLError
Framework step by step easy-to-use process
科研论文写作方法:在方法部分添加分析和讨论说明自己的贡献和不同
凛冬已至,程序员该怎么取暖
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
block yandex bot
[computer level 3 information security] overview of information security assurance
How should programmers keep warm when winter is coming
DELL远程控制卡 使用ipmitools设置ipmi
ArrayList多线程安全解决办法
MySQL adds sequence number to query results
框架一步一步方便使用的流程
Multi module packaging: package: XXX does not exist
mysql的日期与时间函数,varchar与date相互转换
Flask Development & get/post request