← 返回列表

Python3 字符串String Lstrip 方法

Python3 字符串String Lstrip 方法 #!/usr/bin/python3 str = " this is string example....wow!!!" print (str.lstrip()) str = "*****this is string example....wow!!!*****" print (str.lstrip('*'))

Python3 字符串String Lstrip 方法

#!/usr/bin/python3

str = "     this is string example....wow!!!"
print (str.lstrip())

str = "*****this is string example....wow!!!*****"
print (str.lstrip('*'))

打开资源 ↗

交流与评论