You have two different codes, they will be saved with different names obviously and hence different files. But you can always have them under the same directory.
Now coming to deleting files in python, its pretty simple. You'll have to use the OS module which will let you access the files on your system. Use the following code:
print("The file does not exist")