R
Rene Aguirre
Hello everybody,
I needed to add a list to a dictionary, something very simple:
Buen, when I just move the 'append' statement to the dictionary
assigment then:
Not what I expected, then I came to the conclusion that
[].append(value) returns 'None', why?
Rene A.
I needed to add a list to a dictionary, something very simple:
{'one': [1]}d = {}
l = []
l.append(1)
d["one"] = l
d
Buen, when I just move the 'append' statement to the dictionary
assigment then:
{'one': None}l = []
d = {}
d["one"] = l.append(1)
d
Not what I expected, then I came to the conclusion that
[].append(value) returns 'None', why?
Rene A.