I\'d like to distinguishing None and empty strings when going back and forth between Python data structure and csv representation using Python\'s csv
None
csv
As you have control over both the consumer and the creator of the serialised data, consider using a format that does support that distinction.
Example:
>>> import json >>> json.dumps(['foo', '', None, 666]) '["foo", "", null, 666]' >>>