how to clear text of a file python 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()