import os import os.path if os.path.isfile("postData"): os.remove("postData")