title: dictionary key value concatenation
body: <p>I'm attempting to concatenate (which I believe is the best way to do things here) my key/value pairs in my dict. What I would like to do is append these key/values to a list and then use join() to make that one large string. I would prefer this to work as a function and for any dict that is passed. Here is an example dict, </p>
  
  <pre><code>dictyy = {'first': 'one', 2: 'two', 'something': 'somethingValue',
        'somethingelse': 'somethingElseValue', 'last': 'lastvalue'}
  </code></pre>
  
  <p>I really only care that the concatenated string has the 'first' and 'last' keys in their respective [0] and [-1] positions. I know I will always have those two keys so I should be able to place them in the string like this. </p>
  
  <p><code>stringyy = 'python first' + dictyy['first'] + '{} {} {} {}' + 'last' + dictyy['last']'.format(key1, dictyy['key1'], key2, dictyy['key2'])</code></p>
  
  <p>The other values can be in any order. What's tricky here is that I could receive anywhere from 1-4 of those 'middle' key/values in <code>dictty</code> and I'm not sure how to account for this varying number. I know what the keys would be but I don't always have to receive certain keys so if I have a predefined string that I want to format and reference a specific value for a key that wasn't passed along, then I'll receive a <code>KeyError</code>. </p>
  
  <p>Other than conditionals, is there any way to prepare for this uncertainty of what I'll receive and is there any way to directly reference a key in a dict? Something that could work like this may help:</p>
  
  <pre><code>def get_keys(dictyy):
      for key in dictyy.keys() != 'first or 'last'
          print key
  </code></pre>