Advertisement
skip420

Change_vote

Nov 21st, 2020 (edited)
1,501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  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.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement