# coding = utf-8
# 创建一个字符串hello_world
hello_world = ' **The world ** is big!* '
# 利用strip()方法处理hello_world字符串
blank_hello_world = hello_world.strip()
char_hello_world = hello_world.strip('TH *')
# 打印输出转换后的字符串
strip去掉首尾空格和指定字符Python
最新推荐文章于 2021-08-31 00:03:42 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)