I\'m creating a function that consolidates a couple of lists into a string and am encountering the below error.
Traceback (most recent call last):
File \"Tradi
If you are using Python 2, then either map
or dict
is bound to None
. Check the rest of your code for assignments to either name.
Note that instead of map(None, iterable1, iterable2)
you can use zip(iterable1, iterable2)
to get the same output.
If you are using Python 3, then the map()
method does not support None
as a first argument:
>>> list(map(None, [1], [2]))
Traceback (most recent call last):
File "", line 1, in
TypeError: 'NoneType' object is not callable
and you certainly want to use zip()
there:
defsTwo = dict(zip(letters, defsOne))