Skip to content

Instantly share code, notes, and snippets.

@valericus
Created January 22, 2016 01:19
Show Gist options
  • Save valericus/2253435572fe9513e575 to your computer and use it in GitHub Desktop.
Save valericus/2253435572fe9513e575 to your computer and use it in GitHub Desktop.
Соединение двух списко в словарь
from itertools import repeat, chain
def get_dict(keys, values):
result = dict()
for key, value in zip(keys, chain(values, repeat(None))):
result[key] = value
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment