On Apr 13, 11:39 pm, Tina I <[EMAIL PROTECTED]> wrote: > Hello group, > > Say I have the following dictionary: > > ListDict = { > 'one' : ['oneone' , 'onetwo' , 'onethree'], > 'two' : ['twoone' , 'twotwo', 'twothree'], > 'three' : ['threeone' , 'threetwo', threethree']} > > Now I want to append 'twofour' to the list of the 'two' key but I can't > figure out how to that? > Some pointers would be greatly appreciated. > > Thanks > Tina
ListDict["two"] returns the list. So you can do this: lst = listDict["two"] lst.append("twofour") or you can do it directly like this: ListDict["two"].append("twofour") -- http://mail.python.org/mailman/listinfo/python-list