![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
DSJ_ kohler
逻辑严谨
展开
-
python将文本(txt)转excel(xls)
需要提前安装相关python包(如果通过安装anconda可以忽略)pip3 xlwtpip3 codecspython代码import xlwtimport codecs#输入的文本文件的路径input_txt = r'D:\Users\test0.txt'#输出excel的路径output_excel = r'D:\Users\finish0.xls'#保存到excel的那个工作表sheetName = 'test'#从哪行哪列开始start_row = 0start_原创 2021-08-08 08:26:11 · 1329 阅读 · 0 评论 -
Python学习笔记
list增: append:末尾原样添加 insert(index,ele):插入 extend:元素取出从末尾插入 + : 两个list可以增加删: del list[in dex]:删除指定下标元素 .pop :弹出最后一个元素 .remove :根据内容删除改: list[index] = xxx 查: xxx in list: 是否在,返回bool not in: .index(xxx,startIndex,endIndex):查指定范围,左闭右开,有返回下标,没报原创 2021-06-17 23:39:01 · 59 阅读 · 0 评论 -
python实现自动打开文档,软件
首先确保电脑有pyautogui包pip install pyautoguiimport osimport pyautoguiimport timeimport win32guiimport win32uifrom pywinauto.application import Applicationimport win32apiimport win32con#pyautogui.moveTo()将鼠标移动到指定位置# time.sleep(6)# pyautogui.click(cl原创 2021-01-28 13:43:37 · 769 阅读 · 1 评论