B
bucket79
Hi
is there anyway appending to dictionary?
list has this feature
but dictionary can't
i wanna do like this thing{1:2, 3:4}
so i try this feature likebut this make's error
because a.keys().append(3) makes 'None' (i can't understand this )
so i try copy.copy(a.values()).append(4)))
and
a = dict(zip(copy.deepcopy(a.keys()).append(3),
copy.deepcopy(a.values()).append(4)))
but this make's error, too
why a.keys().append(3) makes 'None' ?
and is there anyway appending to dictionary?
any post will be appreciated
is there anyway appending to dictionary?
list has this feature
[1]a = []
a.append(1)
print a
but dictionary can't
i wanna do like this thing{1:2, 3:4}
so i try this feature likebut this make's error
because a.keys().append(3) makes 'None' (i can't understand this )
so i try copy.copy(a.values()).append(4)))
and
a = dict(zip(copy.deepcopy(a.keys()).append(3),
copy.deepcopy(a.values()).append(4)))
but this make's error, too
why a.keys().append(3) makes 'None' ?
and is there anyway appending to dictionary?
any post will be appreciated