Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import shutil
- from os import path
- def main():
- # make a duplicate of an existing file
- if path.exists("Trump_Biden.txt"):
- # get the path to the file in the current directory
- src = path.realpath("Trump_Biden.txt");
- # rename the original file
- os.rename('Trump_Biden.txt','Biden_Trump.txt')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement