摘要: python2将一个字符串写入文件中: 1、如果字符串是str类型 # -*- coding:utf-8 -*- txtFile="今天天气不错" f = open("1.txt", "wb") f.write(txtFile) f.close() 2、如果字符串是unicode类型 # -*- c 阅读全文
posted @ 2019-05-15 17:12 努力奋斗小青年 阅读(2435) 评论(0) 推荐(1) 编辑
摘要: 一、获得邮箱地址 (?:xxx)为非捕获分组 # -*- coding:utf-8 -* import re str1 = 'fdg.lll.pp123@163.com hdfh.abc@qq.com hidfsd@qq.com.com gfgfa@qq.com bdfdg@163.com' reg 阅读全文
posted @ 2019-05-15 14:14 努力奋斗小青年 阅读(12326) 评论(0) 推荐(0) 编辑