Hi,
We can use rename() method to rename a file or directory source 'src' (actual name) to destination 'dst'(new name). And this method does not return any value.
Use the following syntax:
os.rename(src, dst)
In your case, you can use the following code:
import os
os.rename('abc.txt', 'xyz.kml')