Newbie help with array handling

7stud bbxx789_05ss at
Thu Apr 12 11:50:55 CEST 2007

On Apr 12, 3:31 am, "loial" <a... at> wrote:
> OK, thanks for the replies
> One other thing...I need to update the values since they are basically
> totals that I am accumulating.
> How do I update a specific value for a specific key?


returns the value, which in this case is a list.  So, you could write:

lst = mydict["keyvalue1"]
lst[0] = 4

or you can do it directly:

mydict["keyvalue1"][0] = 4

More information about the Python-list mailing list