python大小写转换
来源:互联网 发布:改键软件 编辑:程序博客网 时间:2024/05/13 23:26
基于我的学习总结,这次分享python字符大小写的转换,讲述4种方法
大写
把所有字符中的小写字母转换成大写字母
>>> str = "hELLO world!">>> print (str.upper())HELLO WORLD!
小写
把所有字符中的大写字母转换成小写字母
>>> str = "hELLO world!">>> print (str.lower())hello world!
第一个字母转为大写
把第一个字母转化为大写字母,其余小写
>>> str = "hELLO world!">>> print (str.capitalize())Hello world!
每个单词的第一个字母大写
把每个单词的第一个字母转化为大写,其余小写
>>> str = "hELLO world!">>> print (str.title())Hello World!
0 0
- python 字符串 大小写转换
- python 大小写转换
- 【python】 字符串转换大小写
- Python 大小写的转换
- python大小写转换
- python大小写转换
- Python -- 字符串大小写转换
- python 大小写转换函数
- python 字符串 大小写转换
- python大小写转换
- python大小写转换函数
- python大小写转换函数
- Python大小写转换
- Python-大小写转换
- python大小写转换函数备忘
- Python字符串的大小写转换
- 【Python-2.7】大小写转换函数
- Python进阶---python 中字符串大小写转换
- iOS Runtime
- [实验室]2016.9.28
- SD卡中的FAT32文件系统(一)
- 数据库理论之ACID和BASE的比较
- Python Scrapy实例之NumKr
- python大小写转换
- 9.1 Zend_Json
- ssm+maven项目中配置webSocket
- android 命令行环境配置-------adb
- 剑指offer-算法题练习:part8 跳台阶-斐波那契数列问题
- Programming In Scala笔记-第七章、Scala中的控制结构
- POJ:1703 Find them, Catch them(种类并查集(影子并查集))
- redis和memcached的区别
- 数据结构基本概念和术语