摘要:
# _*_ coding: utf-8 _*_ # auther = 林深见鹿,海蓝见鲸 import subprocess import datetime def time_stamp(): now_time = datetime.datetime.now() print(now_time) de 阅读全文
摘要:
# -*- coding:utf-8 -*- # auther = 林深见鹿,海蓝见鲸 ''' dict = {"Bob":["class1"],"Alex":"class2","Gob":"class3","Joe":"class4"} dict['jiao'] = "class5" print( 阅读全文
摘要:
一、python中数据类型(红色为可变类型) 1、字符串 str2、布尔类型 bool3、整数 int 4、浮点数 float5、数字 (int和float)6、列表 list7、元组 tuple8、字典 dict9、日期 date 二、可变类型 可变类型:在id(内存地址)不变的情况下,value 阅读全文
摘要:
# -*- coding:utf-8 -*- # __author__ = "林深见鹿海蓝见鲸" # ② 九九乘法表 name = "99乘法表" title = name.center(60,"-") print(title) for i in range(1,10): # print("I:", 阅读全文
摘要:
# -*- coding:utf-8 -*- # __author__ = "林深见鹿海蓝见鲸" # ③随机20个京牌 import string import random car_list = [] begin = "京" count = 0 while count<3: # count+=1 阅读全文
摘要:
# -*- coding:utf-8 -*- # __author__ = "林深见鹿海蓝见鲸" from PIL import Image, ImageDraw, ImageFont ''' 图片增加文字水印 convert('RGB')进行通道转换 mode:模式,通常用"RGB"这种模式 si 阅读全文
摘要:
# -*- coding:utf-8 -*- #__author__ = "林深见鹿海蓝见鲸" from urllib.parse import unquote,quote def Unquote(): url = 'http%3A//123' unquote_url = unquote(url) 阅读全文
摘要:
# -*- coding:utf-8 -*- # auther = 林深见鹿 # excel_controller.py import xlrd import xlwt from CoreMail.Tools import excel_data ''' xlrd.open_workbook(file 阅读全文
摘要:
一、校验数字的表达式 1. 数字:^[0-9]*$ 2. n位的数字:^\d{n}$ 3. 至少n位的数字:^\d{n,}$ 4. m-n位的数字:^\d{m,n}$ 5. 零和非零开头的数字:^(0|[1-9][0-9]*)$ 6. 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+( 阅读全文
摘要:
# -*- coding:utf-8 -*- import requests import datetime import time import threading ''' allow_redirects = False禁止重定向,添加在request参数后 get请求用params传参 post 阅读全文