标签: python python-3.x
我以这种方式在python中打开文件:
File = 'results.xml' myFile = open(File)
问题是,我可以通过哪种方式在Python中使用with open打开它?
with open
我尝试这样写:
with open('results.xml', 'a') as File:
但是没跑? 我该如何解决?