title: AttributeError: 'dict' object has no attribute (...) when iterate over a dictionary of sets
body: <p>I'm trying to remove a node from an undirected graph represented by his adjacency list but I'm receiving an error that I can't understand.</p>
  
  <p>Example of a ugraph:</p>
  
  <pre><code>g1 = {0: set([1]), 1: set([0, 2]), 2: set([1, 3]), 3: set([2]), 4: {5, 6}, 5: {4}, 6: {}}
  </code></pre>
  
  <p>Function that I'm creating:</p>
  
  <pre><code>def remove_node(ugraph, node):
      """
      :param ugraph: An undirected graph
      :param node: The node that we want to remove
      :return: The undirected graph minus one node :)
      """
  
      try:
          del ugraph[node]
      except KeyError:
          print "The node is not in the graph" 
  
      for key in ugraph.keys():
          ugraph[key] = ugraph[key].difference(set([node]))
  
      return ugraph
  </code></pre>
  
  <p>And this is my error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/juan/PycharmProjects/AlgorithmicThinking_week2/resilence.py", line 46, in &lt;module&gt;
      print remove_node(g1, 1)
    File "/home/juan/PycharmProjects/AlgorithmicThinking_week2/resilence.py", line 42, in remove_node
      ugraph[key] = ugraph[key].difference(set([node]))
  AttributeError: 'dict' object has no attribute 'difference'
  </code></pre>
  
  <p>Why is this happening?</p>