upper()字符串中字母由小写变为大写

lower()字符串中字母由大写变为小写

capitalize()字符串中字母首字母大写其余小写

title()字符串中字母每个单词的首字母大写其余小写

举个列子:

 1 a = "hello"
2 b = "WORLD"
3 c = "hello"
4 d = "hello world"
5 a1 = a.upper()
6 b1 = b.lower()
7 c1 = c.capitalize()
8 d1 = d.title()
9 print(a1)
10 print(b1)
11 print(c1)
12 print(d1)

输出结果:

HELLO
world
Hello
Hello World

实际运用就如上面代码书写。

最新文章

  1. ES6(四) --- 正则 Number Math
  2. Azure 新的管理模式 —— Resource Manager
  3. Difference between web server ,web container and application server
  4. Oracle 11g XE release2安装与指导
  5. elf文件中的.plt .rel.dyn .rel.plt .got .got.plt的关系
  6. SQLServer视图
  7. 模拟实现ORM实例
  8. 硅谷新闻1--引导界面GuideActivity
  9. java 学习路线《转》
  10. Entity Framework with MySQL 学习笔记一(关系整理版)
  11. mysql 时间
  12. Linux下的视频字幕编辑
  13. linux命令类型及执行顺序
  14. Java中List集合的三种遍历方式(全网最详)
  15. python-inotify 在linux上安装
  16. DUILIB UI创建过程
  17. 多条件分类统计group by 显示数目为0的类别
  18. [DP][NOIP2015]子串
  19. LeetCode(41):缺失的第一个正数
  20. Repeater 中TextBox 触发TextChanged事件

热门文章

  1. nginx http 正向代理
  2. SpringBoot集成RabbitMQ
  3. 简单明了区分IE,Firefox,chrome主流浏览器
  4. vue之v-show与v-if的区别
  5. PAT 乙级 1071 小赌怡情(15 分)
  6. [转][PowerShell]ps执行重启IIS
  7. bundle adjustment原理(1)
  8. android scrollview listview显示不全
  9. AAA及Radius
  10. Android 中Jackson的简单使用