title: For loop error when Json key is replaced by an other one
body: <p>I've made a for loop to find keys in a Json file, I've got an issue when the <code>price</code> key is replaced by 'price_calendar' key.<br>
  It appears when the customer doesn't put price in his ad.<br>
  I'm tring to go over this error with an if statement but it doesn't work.<br>
  If anyone can explain why it doesn't work.</p>
  
  <pre><code>response = requests.post(url, headers=headers, 
  data=json.dumps(payload))
  status = response.status_code
  result = response.json()
  ads = result['ads']
  
  for ad in ads: 
    id = ad['list_id']
    print(id)
    title = ad['subject']
    print(title)
    url = ad['url']
    print(url)
    if ad['price'][0] not in ads:
      print ('No price')
    else:
      price = ad['price'][0]
      print (price,"$")
    date = ad['first_publication_date']
    print(date)
  </code></pre>
  
  <hr>
  
  <p>Error : </p>
  
  <pre><code>Exception has occurred: KeyError 'price'
  </code></pre>
  
  <p>Thanks</p>