1、加r防止转义
r’’‘string’’’
python在字符串前加r是为了防止字符转义的。
r’’‘string %d,%s’’’%(data_width, tc_name)
2、文件打开、写入、关闭
fw=open(file_name, “w”)
fw.write(string)
fw.close
3、括号的区别
()元组数据类型
[]list列表数据类型
{}字典数据类型
4、xlrd模块
xlrd.sheet.cell.value 返回cell中的值
xlrd.sheet.cell.ctype 返回cell中的数据类型
python读取excel单元格内容返回的5种类型
append



