The structure of my dictionary is:
key val
item a list of values
How I initiated my dict
:
dict[item] = [word]
type(dict[item]) ---> gives me list
When going down the loop and try to add more values to the list with the same key, dict[item].append(word)
gives me None
whereas dict[item] + [word]
works
Why is this the case?