I'm trying to store the output of a Function into a file in Python, what I am trying to do is something like this:
def test():
print("This is a Test")
file=open('Log','a')
file.write(test())
file.close()
But when I do this I get this error:
TypeError: argument 1 must be string or read-only character buffer, not None
PD: I'm trying to do this for a function I can't modify.