how to delete a text in python file code example
Example: clearing all text from a file in python
fileVariable = open('textDocName.txt', 'r+')
fileVariable.truncate(0)
fileVariable.close()
fileVariable = open('textDocName.txt', 'r+')
fileVariable.truncate(0)
fileVariable.close()