I want to change a.txt to b.kml.
a.txt
b.kml
Use os.rename:
os.rename
import os os.rename('a.txt', 'b.kml')
2.1m questions
2.1m answers
60 comments
57.0k users