sness

blog of sness

Thursday, September 12, 2013

python - Check if a given key already exists in a dictionary - Stack Overflow

python - Check if a given key already exists in a dictionary - Stack Overflow: "if 'key1' in dict.keys():
print "blah"
else:
print "boo""

'via Blog this'
sness at 9/12/2013 01:47:00 pm
‹
›
Home
View web version
Powered by Blogger.