[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f9_DK3-zd4IhsAFGfoQgt-ginNZmLMm4t_dYQEVQeWyw":3},{"id":4,"source":5,"question":6,"options":7,"answer":12,"related":13,"type":24,"origin":105,"createTime":26},198128464,"v1","以下哪个选项是正确关闭一个打开文件的方法",[8,9,10,11],"file.close()","close(file)","file.exit()","exit(file)",[],[14,27,37,41,51,61,71,81,90,96],{"id":15,"source":5,"question":16,"options":17,"answer":22,"related":23,"type":24,"origin":25,"createTime":26},198128462,"在Python中,以下哪个函数用于打开一个文件",[18,19,20,21],"open_file()","file_open()","open()","fopen()",[],[],0,null,"2025-06-11T04:26:34+08:00",{"id":28,"source":5,"question":29,"options":30,"answer":35,"related":36,"type":24,"origin":25,"createTime":26},198128463,"如何以只读模式打开一个名为data.txt的文件",[31,32,33,34],"open('data.txt', 'r')","open('data.txt', 'w')","open('data.txt', 'a')","open('data.txt', 'rb')",[],[],{"id":4,"source":5,"question":6,"options":38,"answer":39,"related":40,"type":24,"origin":25,"createTime":26},[8,9,10,11],[],[],{"id":42,"source":5,"question":43,"options":44,"answer":49,"related":50,"type":24,"origin":25,"createTime":26},198128465,"若要以二进制写模式打开一个文件,应使用哪个模式",[45,46,47,48],"b'","wb'","w+'","bw'",[],[],{"id":52,"source":5,"question":53,"options":54,"answer":59,"related":60,"type":24,"origin":25,"createTime":26},198128466,"以下哪个选项不是有效的文件打开模式",[55,56,57,58],"'x'","'wb+'","'r+'","'rw'",[],[],{"id":62,"source":5,"question":63,"options":64,"answer":69,"related":70,"type":24,"origin":25,"createTime":26},198128467,"如何正确地使用with语句打开并自动关闭文件",[65,66,67,68],"with open('file.txt') as file","with file.open('file.txt')","file with open('file.txt')","open('file.txt') with as file",[],[],{"id":72,"source":5,"question":73,"options":74,"answer":79,"related":80,"type":24,"origin":25,"createTime":26},198128468,"在使用open()函数时,如果不指定模式,文件将以什么模式打开",[75,76,77,78],"写模式('w')","读模式('r')","追加模式('a')","二进制读模式('rb')",[],[],{"id":82,"source":5,"question":83,"options":84,"answer":88,"related":89,"type":24,"origin":25,"createTime":26},198128469,"以下哪个模式用于在文件不存在时创建新文件进行写入,如果文件存在则打开失败",[85,55,86,87],"'w'","'a'","'r'",[],[],{"id":91,"source":5,"question":92,"options":93,"answer":94,"related":95,"type":24,"origin":25,"createTime":26},198128470,"使用哪个模式打开文件时,如果文件不存在会自动创建文件",[55,85,86,87],[],[],{"id":97,"source":5,"question":98,"options":99,"answer":103,"related":104,"type":24,"origin":25,"createTime":26},198128471,"若要在读写模式下打开一个文件,并且文件指针位于文件开头,应使用哪个模式",[57,100,101,102],"'w+'","'a+'","'x+'",[],[],{"courseName":106,"courseImg":107,"workName":108,"workId":109,"count":110,"courseId":111},"默认课程","https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002F03a579384a6dc297c89809b582fcc767.png","4.12 资本主义政治制度和意识形态","work_44206279",25,"53e1d2ef4961cca8eea3e23969ad2cb9"]