随笔分类 -  python 基础知识

摘要:Python3中字符串中的数字提取方法 >>> totalCount = '100abc'>>> totalCount = re.sub("\D", "", totalCount)>>> print(totalCount)100>>> type(totalCount)<class 'str'> 在P 阅读全文
posted @ 2021-07-30 15:56 cforcnb 编辑
摘要:md5 = hashlib.md5('adsf')md5.digest() //返回: '\x05\xc1*(s48l\x94\x13\x1a\xb8\xaa\x00\xd0\x8a' #二进制md5.hexdigest() //返回: '05c12a287334386c94131ab8aa00d0 阅读全文
posted @ 2021-07-30 15:54 cforcnb 编辑
摘要:Python 的 do ... while 语法 Python 不支持 do〜while 语法、可以使用 while(无限循环)和 break 组合起来实现 do ~ while 语法 while True: // do something if condition: break 阅读全文
posted @ 2021-03-10 10:55 cforcnb 阅读(761) 评论(0) 推荐(0) 编辑
摘要:Python requests 重试机制 https://blog.csdn.net/weixin_44648216/article/details/103697496 阅读全文
posted @ 2021-02-26 15:57 cforcnb 阅读(32) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示