python - dict value can't be assigned while appending..? -


this question has answer here:

if valst true list (containing elements), why work:

valst.append(seq) id_seq_dict[id] = valst 

but not work:

id_seq_dict[id] = valst.append(seq) 

is because append method returns nothing?

the append() method modifies list , returns nothing (none) indeed.


Comments