Guest User

Untitled

a guest
Aug 18th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. Parse a unicode string in python to a dictionary
  2. keys = ['key1', 'key2', 'key3']
  3. words = u'word1 word2 word3'
  4. vals = words.split()
  5.  
  6. d = dict(zip(keys, vals))
  7.  
  8. ' '.join(sorted(k + ':' + v for k,v in d.items()))
Add Comment
Please, Sign In to add comment