> pairs[son][0] = father > KeyError: 'Steven Bates' > Where am I going wrong?
A KeyError means you are trying to access an object that does not exist in the dictionary. And this is true, you haven't added anything for Steven Bates yet, but you are trying to access his parents list. You need to create an associated list which you can then edit. pairs[son] = [0,0] # need to put dummy data in pairs[son][0] = father pairs[son][1] = grandfather HTH, Alan G Author of the learn to program web tutor http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor