how to clear txt file in 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()