import os if os.path.exists("docs/data.txt"): os.remove("docs/data.txt") if os.path.exists("docs/customdata.txt"): os.remove("docs/customdata.txt") file = open("docs/data.txt", "x") file = open("docs/customdata.txt", "x") file.close()