How do I apply a function to the list of variable inputs?
For e.g. the filter
function returns true values but not the actual output of the function.
from string import upper
mylis=['this is test', 'another test']
filter(upper, mylis)
['this is test', 'another test']
The expected output is :
['THIS IS TEST', 'ANOTHER TEST']
I know upper
is built-in. This is just an example.