How to rename a file using Python

后端 未结 12 1461
借酒劲吻你
借酒劲吻你 2020-11-22 13:47

I want to change a.txt to b.kml.

12条回答
  •  花落未央
    2020-11-22 14:39

    You can use os.system to invoke terminal to accomplish the task:

    os.system('mv oldfile newfile')
    

提交回复
热议问题