I hope I have explained this makes sense...
Basically I want to run a python file which will edit itself and delete itself (don't ask) but to delete itself I need the python file to locate its file path (I know I could manually put the file path in but that means the file would have to stay in the same folder). Does anyone know any code I could use so that the program can copy its file path?
Below is the code I am using so that the program can delete itself as you can see I need the file path but I do not know how to copy it within the program.
import os
os.remove(r"filepath")