Instead of this:
a = {\"foo\": None, \"bar\": None}
Is there a way to write this?
b = {\"foo\", \"bar\"}
In order to "key" into a set in constant time use in:
in
>>> s = set(['foo', 'bar', 'baz']) >>> 'foo' in s True >>> 'fork' in s False