自动化发送163邮件 方法一: import time import datetime from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait # 等待页面加载某些元素 from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by impor
1.求1-2+3-4+5.....99的所有数的和 n = 1 s = 0 while n<100: temp = n%2 if temp == 0: #偶数 s = s-n else: s = s+n n = n+1 print(s) 2.求1-100的所有数的和 n = 1 s = 0 while n < 101: s = s+n n = n+1 print(s) #一行代码搞定 print (sum(range(101))) 3.九九乘法表 for i in range(1,10): f
2019-02-01 产生验证码: 用户输入的值和显示的值相同时显示Correct,否则继续生成随机验证码等待用户输入 def check_code(): import random checkcode='' for i in range(4): current=random.randrange(0,4) if current != i: temp=chr(random.randint(65,90)) else: temp= random.randint(0,9) checkcode +=str