随笔- 182
文章- 1
评论- 28
阅读-
57万
11 2018 档案
Python 字符串操作 starswitch() find() re.IGNORECASE replace() join()
摘要:检测开头&结尾开头:startswith()url = 'http://www.python.org' url.startswith('http') >>>True 结尾:endswith() url = 'http://www.python.org' url.endswith('org') >>>
阅读全文
python:sys.exit() os._exit() exit() quit()
摘要:1》sys.exit() >>> import sys>>> help(sys.exit)Help on built-in function exit in module sys:exit(...) exit([status]) Exit the interpreter by raising Sys
阅读全文