立即学习:https://edu.csdn.net/course/play/26676/379784?utm_source=blogtoedu
os.getcwd()#获取当前目录
with上下文管理器
with open('test.txt','a') as f:
f.write('aaaa')
不需要f.close()
======================
from openpyxl import Workbook
wb = Workbook()
ws = wb.active
ws.title = 'python'
ws2 = wb.create_sheet('java')
ws['E1'] = 111
ws.cell(row = 2, column = 2, value = 222)
wb.save('123.xlsx')