how to clear on contents from a text 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()