Prerequisite: OS module in PythonIn Python3, rename() method is used to rename a file or directory. This method is a part of the os module and comes in extremely handy. Syntax for os.rename() : os.rename(src, dst) : src is source address of file to be renamed and dst is destination