How to rename a file using Python

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

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

12条回答
  •  甜味超标
    2020-11-22 14:42

    os.rename(old, new)

    This is found in the Python docs: http://docs.python.org/library/os.html

提交回复
热议问题