On Sat, Sep 19, 2009 at 9:27 AM, Corey Richardson <kb1...@aim.com> wrote: > I am trying to use a parameter of a function to call a word inside a > dictionary. > Here is my code > wordList = { > 'Apple' : ["A delicious snack"], > 'Word' : ["This code is not working..."], > } > def define(word): > print wordList['Word'] > > > When I use define('Apple') it returns ['This code is not working...'].
That's what you asked it to do, but I think you meant print wordList[word] instead HTH, benno _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor