title: Does the d[key] operation always have to be used with .get()?
body: <p>I know d[key] will take the 'd' items and return them as keys, but if I only use d[key] I always get a keyerror. I've only seen it been used with .get(). For example I saw another question on here that I copied to study from:</p>
  
  <pre><code>myline = "Hello I'm Charles"
  
  character = {}
  
  for characters in myline:
      character[characters] = character.get(characters, 0) + 1
  
  print character 
  </code></pre>
  
  <p>If you can use d[key] alone, could you give me some examples? Why wouldn't the above code work if I remove "character.get(characters, 0) + 1"?</p>