上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 122 下一页
摘要: mail_list = '123<aa2@163.com>acdef, 123123;<ba1@qq.com>acdef,;w8<aah@163.com>acdef,;dtg<ca@186.com>acdef,;jjdtg<qd@163.com>acdef,;jjtr' print('提取所有邮件地 阅读全文
posted @ 2024-01-04 14:33 txwtech 阅读(320) 评论(0) 推荐(0)
摘要: Python 正则表达式(RegEx) 在本教程中,您将学习正则表达式(RegEx),并使用Python的re模块与RegEx一起使用(在示例的帮助下)。 正则表达式(RegEx)是定义搜索模式的字符序列。 例如, ^a...s$ 上面的代码定义了RegEx模式。模式是:以a开头并以s结尾的任何五个 阅读全文
posted @ 2024-01-04 10:49 txwtech 阅读(268) 评论(0) 推荐(0)
摘要: this = chr(ESCAPES[this][1])KeyError: '\\e' re.error: bad escape \e at position 7 错误 正确: 翻译 搜索 复制 阅读全文
posted @ 2024-01-04 09:05 txwtech 阅读(141) 评论(0) 推荐(0)
摘要: 在Python中,脱字符号只在Windows的命令行shell中有效,如果在IDLE或其他文本编辑器中,脱字符号会被忽略,直接当成普通字符处理 要指定排除字符集,可在开头添加一个^字符,例如'[^abc]'与除a、b和c外的其他任何字符都匹配。 翻译 搜索 复制 阅读全文
posted @ 2024-01-04 08:51 txwtech 阅读(50) 评论(0) 推荐(0)
摘要: Python 获取当前时间 本文中,您将学习获取语言环境的当前时间以及Python中的不同时区。 您可以采用多种方法获取Python当前时间。 示例1:使用datetime对象的当前时间 from datetime import datetime now = datetime.now() curre 阅读全文
posted @ 2024-01-03 21:02 txwtech 阅读(151) 评论(0) 推荐(0)
摘要: Python Global 关键字 全局关键字简介 在Python中,global关键字允许您在当前作用域之外修改变量。它用于创建全局变量并在局部上下文中对该变量进行更改。 全局关键字规则 Python中global关键字的基本规则是: 当我们在函数内部创建变量时,默认情况下它是局部的。 当我们在函 阅读全文
posted @ 2024-01-03 20:58 txwtech 阅读(179) 评论(0) 推荐(0)
摘要: Python range() 使用方法及示例 range(start, stop[, step]) 中括号含义:[,step]是第三个参数,可选项 参考 range()参数 range()主要采用三个在两个定义中具有相同用法的参数: start -整数,从该整数开始返回整数序列 stop-要返回整数 阅读全文
posted @ 2024-01-03 20:52 txwtech 阅读(137) 评论(0) 推荐(0)
摘要: 42.python json模块字符串操作_读取写入文件_对象转json字符串转对象相互转换 # This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press 阅读全文
posted @ 2024-01-03 13:35 txwtech 阅读(39) 评论(0) 推荐(0)
摘要: python shelve模块写入dat文件保存数据库 # This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to se 阅读全文
posted @ 2024-01-03 11:19 txwtech 阅读(33) 评论(0) 推荐(0)
摘要: python堆、集合、双端队列 # This is a sample Python script. # 1# 1 # 2# 2 # Press Shift+F10 to execute it or replace it with your code.# 3# 3 # Press Double Shi 阅读全文
posted @ 2024-01-03 10:28 txwtech 阅读(25) 评论(0) 推荐(0)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 122 下一页