+ 1
Dict object not callable, im using jupyter python 3.7. please suggest
Dictionary = dict(zip(word_list,[Len(word) for word in word_list]))
5 odpowiedzi
+ 4
you probably wrote something like this in your code
dict = {}
x = dict(a=1)
so it should work after you rename it
+ 4
Is this full code?
+ 2
sai , quote: "I'm trying to generate a dictionary of words & their lengths from a string"
=> Is this what you're trying to do?
https://code.sololearn.com/ctqK8554k3yh/?ref=app
+ 1
thank you Anna it worked
0
no I didn't write dict ={}.
I just wrote the code same as in my question .
even though I'm getting error as not callable . what to do.
I'm trying to generate a dictionary of words & their lengths from a string