file = open("sample.txt","r+") file.truncate(0) file.close()
def main(): #code return if __name__=='__main__': main()