Loading...
使用webbrowser打开剪贴板中的网站链接import webbrowser import pyperclip url = pyperclip.paste() webbrowser.open(url)从web下载文件使用requests.get()下载一个网页import requests res = requests.get('http://jinjis.cn/index.html...
安装matploylib由于我自己使用的是pycharm,直接import matplotlib会报错说没有安装VC++ 14.0,百度了一下这个居然要4个G
读写文件简单的读取与写入读取文件内容hello.txt在同一目录下hellofile = open('hello.txt', 'r') hellocontent = hellofile.read() print(hellocontent) hellofile.close() hellofile = open('hello.txt', 'r') hellolines = hellofile....
读取excel文件使用 openpyxl 模块openpyxl 官方文档: https://openpyxl.readthedocs.io/en/stable/ import openpyxl wb = openpyxl.load_workbook('E://manictime//1.xlsx')从工作簿调取工作表sheet1 = wb['sheet1']获取单元格from openpyxl...
使用正则表达式查找文本模式导入re模块import re向 re.compile() 传入字符串值,比如创建一个对象来匹配11位的手机号码phoneNumber1 = re.compile(r'\d\d\d-\d\d\d\d-\d\d\d\d')在字符串的第一个引号前加上 r 表示该字符串为原始字符串,不需要转义字符/寻找匹配mo1 = phoneNumber1.search('My num...
今天上了图像处理的上机课,结果因为没选计算机图形学的课,好像别人都会作业的算法就我不会.........于是赶紧学习了一下相关的资料,终于实现了这个函数....参考文章:https://blog.csdn.net/Bryan_QAQ/article/details/78805201