Error in user YAML: (<unknown>): found a tab character that violate indentation while scanning a plain scalar at line 3 column 3
---
- oeasy Python 0473
- 这是 oeasy 系统化 Python 教程,从基础一步步讲,扎实、完整、不跳步。愿意花时间学,就能真正学会。
- 本教程同步发布在:
- 个人网站: `https://oeasy.org`
- 蓝桥云课: `https://www.lanqiao.cn/courses/3584`
- GitHub: `https://github.com/overmind1980/oeasy-python-tutorial`
- Gitee: `https://gitee.com/overmind1980/oeasypython`
---
- 上次了解了农历日期
- 可以将日历修改成农历
- 并且进行输出
- 或者做其他的一些应用
- 日期 不论阳历 还是阴历
- 字符串还有哪些函数吗??









- 如果让你写这类函数怎么办呢?
- 首先判断 是否 是大写字母
- 如果是的话 转化为小写字母
s = "oEasy"
s.upper()
s.lower()
s.title()
s.swapcase()



| 函数名 |
意义 |
| s.isdigit |
是否是数字 |
| s.isalpha |
是否是字符 |
| s.isalnum |
是否是字符或数字 |
| s.isdecimal |
是否是十进制数 |
| 函数名 |
意义 |
| s.isascii |
是否是ascii |
| s.isspace |
是否是空格 |
| s.isidentifier |
是否是标识符 |
| s.isprintable |
是否可打印 |
- 这次研究了 str的函数
- casefold()
- capitalize
- upper()
- lower()
- title()
- 可以控制大小写效果

- 还可以 对字符串 做判断
- 字符串还有什么函数呢?🤔
- 下次再说👋🏻
- 本文来自 oeasy Python 系统教程。
- 想完整、扎实学 Python,
- 搜索 oeasy 即可。