python
fengfanghuang
huangfangfeng.github.io
展开
-
linux安装autopep8使用
pip3 install autopep8 /usr/local/python3/bin/autopep8 --in-place --aggressive --aggressive main.py原创 2022-03-15 10:44:02 · 2390 阅读 · 0 评论 -
Python操作Excel和word
Python操作Excel 依赖两个库:pip installxlwt pip installxlrd import xlwt import xlrd #创建一个excel对象 excel_table=xlwt.Workbook(encoding='utf-8',style_compression=0) #增加一个sheet对象 Sheet_1 = excel_table.add_sheet(‘sheet1’) #写sheet_1的第i行第j列,填入内容是str ...原创 2021-06-28 23:26:45 · 476 阅读 · 0 评论 -
python数据类型
字符串 string str01='this is string' str02="this is string" str03='''this is string this is pythod string this is string''' 布尔类型 bool bool=False bool=True 整数 int int01=20 #数字类型转换 int(x [,base]) 将x转换为一个整数 float(x ) 将x转换到一个浮点数 complex(real [,imag..原创 2021-06-24 23:41:16 · 46 阅读 · 0 评论