test页首

python怪浪bug记录

# 1------------------------------------
print('11122223344444'.lstrip('123')) #44444 ,匹配时不是按照整个字符串匹配的,而是一个个匹配的。

# 2------------------------------------
'xxxx'.replace('xx','x*x')  #x*xx*x
#解决方法
while cmd!=cmd.replace('xx','x*x'):
  cmd=cmd.replace('xx','x*x')
posted @ 2022-09-21 22:16  开饭了没  阅读(45)  评论(0)    收藏  举报

test页脚