随笔分类 - 22 Python
摘要:``` win32api.mouse_event(win32con.MOUSEEVENTF_WHEEL,0,0,-500)# 滚动网页 ```
阅读全文
摘要:原文: "https://blog.csdn.net/u013608424/article/details/80117178"
阅读全文
摘要:原文:https://www.cnblogs.com/chaoguo1234/p/9351951.html class MonsterClass: def __init__(self): self.fn1() def fn1(self): print('fn1') k=MonsterClass()
阅读全文
摘要:import cv2 import numpy as np from matplotlib import pyplot as plt import math arr = [] arr.append({ 'name':'name1', 'path':'big.jpg' }) arr.append({
阅读全文
摘要:import cv2 import numpy as np from matplotlib import pyplot as plt # 读取图片 big.jpg img = cv2.imread('big.jpg', 0) # 读取图片 smart.jpg template = cv2.imrea
阅读全文
摘要:原文:https://www.cnblogs.com/zzliu/p/10233296.html 原文:https://blog.csdn.net/qq_36396104/article/details/82812461 导入模块里面坑应该还是比较多的,所以建议还是规范化编程,这样可以避免很多坑。
阅读全文
摘要:原文:忘了 import time curTime=time.strftime('%Y-%m-%d %H%M%S',time.localtime(time.time())) print(curTime)
阅读全文
摘要:arr1=[1,2,3,4,5] def fn1(num): strName='arr'+str(num) newArr=eval(strName) print(newArr) fn1(1)
阅读全文
摘要:# 去掉arr2中 arr2与arr1重复的元素 arr1 = ['a','b','c'] arr2 = ['a','e','f'] for item in arr2: if item in arr1: arr2.remove(item) print(arr2)# 结果:['e','f']
阅读全文
摘要:# 数组的移除 arr = ['a','b','c'] arr.remove('b') print(arr) arr = ['a','b','c'] for item in arr: if item=='b': arr.remove('b') print(arr)
阅读全文
摘要:list1 = [1,2,3,4,5,6,7,8] # 格式: a[start:stop:step] # start:开始(包含) # stop:结束(不包含该索引) # step:步长(间隔数量) # 实际的意思是: # 取列表的索引 索引>=2 && 索引<=3 挨着的一串列表 # (索引>=2
阅读全文
摘要:#原文:https://www.cnblogs.com/shiluoliming/p/9075693.html # 数组的拼接 c1 = ["Red","Green","Blue"] c2 = ["Orange","Yellow","Indigo"] c1.extend(c2) print(c1)
阅读全文
摘要:arr = ['a','b','c'] for each in arr: print(each) #https://blog.csdn.net/q54244125/article/details/89294895 list = ["a", "b", "c", "d", "e"] for index,
阅读全文
摘要:# 数组的追加 a = ['a','b','c'] a.append('d') print(a)
阅读全文
摘要:rootDir='./resources/v1/'# 根目录 # 按钮测试图片 btnTestPicUrl = { 'armyAttack' : rootDir+'testPic/gj2.jpg', # 打野 攻击 'armyPreset' : rootDir+'testPic/gj2.jpg',
阅读全文
摘要:遍历字典: rootDir='./resources/v1/'# 根目录 # 按钮测试图片 btnTestPicUrl = { 'armyAttack' : rootDir+'testPic/gj2.jpg', # 打野 攻击 'armyPreset' : rootDir+'testPic/gj2.
阅读全文
摘要:原文:https://www.runoob.com/python3/python3-json.html import json data1 = { 'no' : 1, 'name' : 'Runoob', 'url' : 'http://www.runoob.com' } # 对象 转换为 字符串
阅读全文
摘要:原文:https://www.jianshu.com/p/c2e374ea63ec # _*_ coding:UTF-8 _*_ import win32api import win32con import win32gui from ctypes import * import time # 原文
阅读全文
摘要:原文:https://blog.csdn.net/qq_19741181/article/details/79827963 原文:https://www.runoob.com/python3/python3-list.html list1 = [1,2,3,4,5,6,7,8] # 格式: a[st
阅读全文
摘要:原文:忘了 import threading import time def fn1(): print('fn1 start') time.sleep(2) print('fn1 end') print(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime
阅读全文