当前位置:网站首页>openjudge:大小写字母互换
openjudge:大小写字母互换
2022-07-28 05:18:00 【编程器系统】
描述
把一个字符串中所有出现的大写字母都替换成小写字母,同时把小写字母替换成大写字母。
输入
输入一行:待互换的字符串。
输出
输出一行:完成互换的字符串(字符串长度小于80)。
样例输入
If so, you already have a Google Account. You can sign in on the right.
样例输出
iF SO, YOU ALREADY HAVE A gOOGLE aCCOUNT. yOU CAN SIGN IN ON THE RIGHT.
代码
s = input()
for c in s:
if 'a' <= c <= 'z':
print(chr(ord(c) - 32 ),end="")
elif 'A' <= c <= 'Z':
print(chr(ord(c) + 32),end="")
else:
print(c,end="")边栏推荐
- mysql中使用list作为参数进行查询
- Eccv2022 | 29 papers of Tencent Youtu were selected, including face security, image segmentation, target detection and other research directions
- MySQL practice 45 lectures
- Distillation model diagram
- BeanUtils.copyProperties无法复制不同List集合问题解决 Lists.transform函数
- Thinking on multi system architecture design
- Struct模块到底有多实用?一个知识点立马学习
- 蒙特卡罗方法求解圆周率π并用turtle画点,以及完成进度条问题
- DELL远程控制卡 使用ipmitools设置ipmi
- 2021csdn blog star selection, mutual investment
猜你喜欢

repackag failed: Unable to find main class

PC端-bug记录

After ruoyi generates the code corresponding to the database, what should I do to make the following image look like

How practical is the struct module? Learn a knowledge point immediately

自定义Json返回数据

多线程进阶:synchronized底层原理,锁优化、锁升级的过程

在ruoyi生成的对应数据库的代码 之后我该怎么做才能做出下边图片的样子

Digital twin technology creates visual application of smart mine

repackag failed: Unable to find main class

MySQL practice 45 lectures
随机推荐
MySQL basic query
regular expression
Dell remote control card uses ipmitools to set IPMI
Confused, I'm going to start running in the direction of [test]
子父线程交互
LocalDateTime去掉T,JSONField失效
MySQL adds sequence number to query results
Lamda gets the current number of cycles, atomicinteger
DELL远程控制卡 使用ipmitools设置ipmi
分享几种管理C程序中标志位的方法
【idea插件神器】教你如何使用IDEA一键set实体类中所有属性
个人写的一个文件上传工具网站
IDEA配置 service(Run Dashboard) 服务,多模块同时启动
ES6 new variable modifiers let and const, new basic data type symbol
How about ink cloud?
PyTorch 使用 MaxPool 实现图像的膨胀和腐蚀
restFul接口使用个人总结
SSM project quick build project configuration file
Google browser cannot open localhost:3000. If you open localhost, you will jump to the test address
接口幂等性问题