Python noob so I might be going about this the wrong way
I want to use a try/except block to find if a value in a dict isn't set like
try:
if entry['VALUE1'] == None: void()
if entry['VALUE2'] == None: void()
except KeyError:
print "Values not Found"
Of course the 'void' function doesn't exist, is there anything I can do to get round this so that code will work properly
defaultdict? Whenever you access an entry that doesn't exist, it's automatically added with a default value, so you don't have to worry when doing things likeentry['VALUE1'] += value.if entry['VALUE1'] is None: