← 返回列表

Python3 字符串String Startswith 方法

Python3 字符串String Startswith 方法 #!/usr/bin/python3 str = "this is string example....wow!!!" print (str.startswith( 'this' )) print (str.startswith( 'string', 8 )) print (str.startswith( 'this', 2, 4 ))

Python3 字符串String Startswith 方法

#!/usr/bin/python3

str = "this is string example....wow!!!"
print (str.startswith( 'this' ))
print (str.startswith( 'string', 8 ))
print (str.startswith( 'this', 2, 4 ))

打开资源 ↗

交流与评论