摘要: 要验证一个字符串是否为邮箱的话,首先要了解邮箱账号的格式。我尝试过在网上找出一个标准的格式,但是很遗憾我没有找到。我也尝试使用RFC标准来判断邮箱的格式,但是也没有结果。网上些博客说不应该使用RFC标准来验证邮箱是否合法,有兴趣的可以看看“is this email valid?”和“Don’t R 阅读全文
posted @ 2020-03-18 19:03 四叶草134 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 参考文章:https://blog.csdn.net/bqw18744018044/article/details/81171220 第一种是用urllib模块,下面是例示代码: 复制代码代码如下: import urllib status=urllib.urlopen("//www.jb51.ne 阅读全文
posted @ 2020-03-18 18:45 四叶草134 阅读(715) 评论(0) 推荐(0) 编辑
摘要: 源代码: #!usr/bin/python3 # -*- coding:utf-8 -*- # @Time: 2018/12/17 下午2:07 # @File: do_excel.py # @Software: PyCharm import unittest from api_auto.commo 阅读全文
posted @ 2020-03-18 16:41 四叶草134 阅读(355) 评论(0) 推荐(0) 编辑
摘要: import randomdef generate_mobile(): """随机生成一个手机号码。。1[3,5,8,]+9""" phone = '1'+random.choice(["3","5","8"]) for i in range(9): num = random.randint(1,9 阅读全文
posted @ 2020-03-18 15:10 四叶草134 阅读(302) 评论(0) 推荐(0) 编辑
摘要: import random import string # 随机生成6到20位包含大小写字母加数字的用户名 def Creat_usernamePwd(): i = random.randint(6,20) username = ''.join(random.sample(string.ascii_ 阅读全文
posted @ 2020-03-18 15:08 四叶草134 阅读(1832) 评论(0) 推荐(0) 编辑
摘要: # 答疑 有人会问是什么原因导致了 这个问题,按正常理解来说在IDE里面能运行,在命令窗口里也照样能运行,都是执行的同一份文件? 这是因为Python在启动解释器(Interpreter)的时候不只会导入环境变量中sys.path发现的模块,还会导入当前工作目录下的模块。当你在IDLE中启动解释器时 阅读全文
posted @ 2020-03-18 14:23 四叶草134 阅读(242) 评论(0) 推荐(0) 编辑