I’m trying to assign a ‘None’ value to a variable to print on a file but I can’t do it in any way.
I also tried different io method from the module ‘io’ according with the documentation but it seems that is not possible print on a document a blank value. Is there some ‘hack’ to apply to make it possible?
None is not a string, which is why you cannot write it into a file.
What is the meaning of None in the file format you are writing and how is it represented?
Show a line or 2 of code to show your problem. None
prints fine.
print(None)
None
Use ‘if statement’ to print ‘None’ in the file if the value is None.