合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
[TOC] ## 转义字符 ![](https://img.kancloud.cn/bf/99/bf99aa9c9ad7b519010f6d3f3bbcc86e_746x396.png) ## 字符串的输入 ~~~ input() ~~~ ## 字符串的输出 ~~~ print() ~~~ ## 字符串的输出 ![](https://img.kancloud.cn/f6/40/f640fdda81085d38e97b5a5237a2fc10_529x304.png) ## 检测字符串是否包括子字符串 ![](https://img.kancloud.cn/3a/58/3a58fbbf9462160f868b3e3e23fe45e8_801x311.png) ## 统计字符串中某个字符的个数 ![](https://img.kancloud.cn/c6/be/c6beadf07227886e11cd1ba444876c10_756x300.png) ## 将旧字符串替换为新字符串 ![](https://img.kancloud.cn/f8/99/f899a8fc82977410b3e0276c4228ce76_779x306.png) ## 通过指定分隔符对字符串进行切片 ![](https://img.kancloud.cn/34/6f/346f56a642d389b447bdc2c773b14522_706x305.png) ## 移除字符串头尾的空格或指定字符 ![](https://img.kancloud.cn/91/c1/91c1515f6d3a5aecd3cbbaea75a0444d_614x280.png) ## 字符串运算符 ~~~ + 字符串连接 * 重复输出字符串 [ ] 通过索引获取字符串中的字符 [:] 截取字符串中的一部分 ~~~