代码: #coding=utf-8 __author__ = 'zhm' from win32com import client as wc import os import time import random import MySQLdb import re def wordsToHtml(dir): #批量把文件夹的word文档转换成html文件 #金山WPS调用,抢先版的用KWPS,正式版WPS word = wc.Dispatch('KWPS.Application') for pat…
I have planed to learn Python for many times. I have started to learn Python for many times . However, I can't use it fluently up to now. Now I know I was wrong. I just tried to remember the syntax and took notes on paper with little practice. Now I…
1.数据类型 python中数有四种类型:整数.长整数.浮点数和复数. 整数, 如 1 长整数 是比较大的整数 浮点数 如 1.23.3E-2 复数 如 1 + 2j. 1.1 + 2.2j 2. 自然字符串, 通过在字符串前加r或R. 如 r"this is a line with \n" 则\n会显示,并不是换行. 注意:如果前面没加r或R,则\n表示换行,如果有r或R,则会正常打印\n this is a line with \n>>> a = 'this is…