Skip to content

Instantly share code, notes, and snippets.

@Zagrebelin
Forked from anonymous/.py
Created June 8, 2016 08:26
Show Gist options
  • Save Zagrebelin/69cf5334c4f85ed60537bc9cc43fcfd3 to your computer and use it in GitHub Desktop.
Save Zagrebelin/69cf5334c4f85ed60537bc9cc43fcfd3 to your computer and use it in GitHub Desktop.
def vake(list_of_keys,list_of_values):
if len(list_of_values) >= len(list_of_keys):
return {x[0]:x[1] for x in zip(list_of_keys,list_of_values)}
else:
list_of_values = list_of_values + [None]*(len(list_of_keys) - len(list_of_values))
return {x[0]:x[1] for x in zip(list_of_keys,list_of_values)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment