Is there a more concise way of doing this in Python?:
def toDict(keys, values): d = dict() for k,v in zip(keys, values): d[k] = v return d
Yes:
dict(zip(keys,values))
1.4m articles
1.4m replys
5 comments
57.0k users