Corey Richardson 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']
You put quotess around word whic
On Sat, Sep 19, 2009 at 9:27 AM, Corey Richardson 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 wordLi
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 w