how to use os.rename and print in one function code example Example: rename file python import os os.rename('old_name.txt','new_name.txt')