12 2020 档案
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : jack import re class reUnit(): """ 通过正则表达式获取指定字符串值方法,如果结果不唯一,则返回多个 """ def reUnit(anyStr,lef
阅读全文
摘要:alt+enter 快速导包 Ctrl + Shift + F 全局查找 Ctrl + Shift + R 全局替换
阅读全文
摘要:#提取URL所有key或者单个key方法 url="http://192.168.1.1:8080/login?from=t8t-dcp-dcs&ID=172180009&name=xiaoming" a=url.split("?")[1] #利用split方法根据?号进行截取返回一个字符串 结果:
阅读全文
摘要:text = "今天晚上一起吃饭哈"assert text.__contains__("吃饭")
阅读全文
摘要:class testStoreAppointmentAdd(self): arr = random.sample(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], 8) #获取一个8位数随机数 RandomNum = "".join(arr) #
阅读全文

浙公网安备 33010602011771号