当前位置:网站首页>Openjudge: filter extra spaces
Openjudge: filter extra spaces
2022-07-28 05:36:00 【Programmer system】
describe
There may be multiple consecutive spaces in a sentence , Filter out the extra space , Just leave a space .
Input
a line , A string ( Length not exceeding 200), There are no spaces at the beginning and the end of a sentence .
Output
Filtered sentences .
The sample input
Hello world.This is c language.
Sample output
Hello world.This is c language.
Code
s = input().split()
for i in s:
print(i, end=" ")边栏推荐
猜你喜欢

BigDecimal 进行四舍五入 四舍六入和保留两位小数

visio如何快速生成相同的图案,生成图像矩阵

How to compare long and integer and why to report errors

SSLError

架构设计思考之一(SSO设计)

JMeter related knowledge sorting

Invalid bound statement (not found): com.exam.mapper.UserMapper.findbyid

测试开发---自动化测试中的UI测试

Scope, execution process and life cycle of bean

Digital twin solutions inject new momentum into the construction of chemical parks
随机推荐
导出excel,生成多个sheet页,并命名
Long和Integer如何进行比较,为什么报错
动态卷积的本质
VMware Workstation 与 Device/Credential Guard 不兼容。禁用 Device/Credential Guard
GET与POST区别
关于swagger中的localDateTime
MySQL adds sequence number to query results
URL 形式
多线程进阶:synchronized底层原理,锁优化、锁升级的过程
集合框架的操作使用
C language: some self realization of string functions
24小时内的时间段无交叉
openjudge:病人排队
多线程进阶:锁的策略
openjudge:找第一个只出现一次的字符
openjudge:找出全部子串位置
2021csdn blog star selection, mutual investment
openjudge:判断字符串是否为回文
openjudge:石头剪刀布
C language: realize the simple function of address book through structure