| 方法 | 作用 |
|---|---|
| find(str) | 返回str出现的索引位置 |
| str.count(x) | 统计字符串中x出现的次数 |
| endswith(str) | 字符串以str结尾否 |
| starswith(str) | 字符串以str开头否 |
| isdigit | 字符串全为数字否 |
| isappha | 字符串全为字母否 |
| replace(x,y) | 将字符串中的x替换成y |
| split | 对字符串进行分割 |
| strip | 去除字符串收尾指定的字符(默认为空格) |

| 方法 | 作用 |
|---|---|
| find(str) | 返回str出现的索引位置 |
| str.count(x) | 统计字符串中x出现的次数 |
| endswith(str) | 字符串以str结尾否 |
| starswith(str) | 字符串以str开头否 |
| isdigit | 字符串全为数字否 |
| isappha | 字符串全为字母否 |
| replace(x,y) | 将字符串中的x替换成y |
| split | 对字符串进行分割 |
| strip | 去除字符串收尾指定的字符(默认为空格) |