Jump to content

okayservers

Members
  • Posts

    1
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

2,472 profile views

okayservers's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. I wanted to test if a key exists in a dictionary before updating the value for the key. I wrote the following code: if 'key1' in dict.keys(): print "blah" else: print "boo" I think this is not the best way to accomplish this task. Is there a better way to test for a key in the dictionary for python?
×
×
  • Create New...