Python Excluir texto no arquivo de texto

# Delete all text in a text file
f = open("text_file.txt", "r+")
f.truncate(0)
f.close()
Hello There