skip420

Change_vote

Nov 21st, 2020 (edited)
922
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import os
  2. import shutil
  3. from os import path
  4.  
  5. def main():
  6.     # make a duplicate of an existing file
  7.  if path.exists("Trump_Biden.txt"):
  8.     # get the path to the file in the current directory
  9.   src = path.realpath("Trump_Biden.txt");
  10.        
  11.     # rename the original file
  12. os.rename('Trump_Biden.txt','Biden_Trump.txt')
  13.        
  14.  
RAW Paste Data