Try the following:
keys = ['key1', 'key2', 'key3'] words = u'word1 word2 word3' vals = words.split() d = dict(zip(keys, vals))
And then, if you want to get key / value pairs in a string similar to the one indicated in your example:
' '.join(sorted(k + ':' + v for k,v in d.items()))
source share