title: How to get the last item of the dictionary when looping
body: <p>I know <code>dictionaries</code> differ from list and the "last" item is not meaningful in <code>dictionary</code> context. But I have a loop which iterates over a dictionary based on the user input, and then if the user input equals one of the keys, it shows a messages, otherwise, it checks to see if this is the last item of the dictionary, and if yes, shows a message that says "No such <code>dictionary</code>'s key has been found. Please revise your entry."</p>
  
  <p>Here is the code:</p>
  
  <pre><code>dic  = {"Name" : "mostafa", "job" : "Animator", "Likes" : 'Smoking', 'target' : 'nothing'};
  
  inp = input("Please eneter a key to show: \r\n");
  
      for item in dic :
          if(inp == item) :
              print("Thanks, found the key.");
              break;
          # Here I need an IF to check whether this is the last key or not
  </code></pre>