I am trying to write a function, that applies a function to a list. I am trying to capitalise all the words in a list but can't get it to work. Here is what I've done so far:
list = ("hello", "this", "is", "a", "test")
def firstFunction(x):
return list.upper()
print firstFunction
The error I get is:
<function firstFunction at 0x0000000002352A58>
I'm really stuck on what to do next, any help would be greatly appreciated.
EDIT: I've just changed it but it's still not working:
mylist = ("hello", "this", "is", "james")
def firstFunction(x):
return may(lambda: x.upper(), mylist)
print firstFunction()