python中name is not defined怎么解决_python name 'file' is not defined的解决办法
python版本3.11源码:poem='''\ProgrammingisfunWhentheworkisdoneifyouwannamakeyourworkalsofun:usePython!'''f=file('poem.txt','w')#openfor'w'ritingf.write(poem)#writetexttofilef.close()#closethefilef=file('po