Created
January 22, 2016 01:19
-
-
Save valericus/2253435572fe9513e575 to your computer and use it in GitHub Desktop.
Соединение двух списко в словарь
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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