#複製檔案,把exp12-10.py,複製到copy.py檔案 #讀入exp12-10.py a1 = open('exp12-10.py','rt',encoding='utf-8') txt = a1.read() a2 = open('copy.py','wt',encoding='utf-8') a2.write(txt) print('已經成功複製到copy.py') a1.close() a2.close()