So I have a P = dict(). I have the following code:
def someFunction():
    P['key'] += 1
    '''do other task'''
What is the simplest way to check if P['key']  is defined or not?
I checked How do I check if a variable exists? but I am not sure if that answers my question.
 
     
     
     
    