随笔分类 - python 基础知识
摘要:Python3中字符串中的数字提取方法 >>> totalCount = '100abc'>>> totalCount = re.sub("\D", "", totalCount)>>> print(totalCount)100>>> type(totalCount)<class 'str'> 在P
阅读全文
摘要:md5 = hashlib.md5('adsf')md5.digest() //返回: '\x05\xc1*(s48l\x94\x13\x1a\xb8\xaa\x00\xd0\x8a' #二进制md5.hexdigest() //返回: '05c12a287334386c94131ab8aa00d0
阅读全文
摘要:Python 的 do ... while 语法 Python 不支持 do〜while 语法、可以使用 while(无限循环)和 break 组合起来实现 do ~ while 语法 while True: // do something if condition: break
阅读全文
摘要:Python requests 重试机制 https://blog.csdn.net/weixin_44648216/article/details/103697496
阅读全文