If I want to take a list of numbers and do something like this:
lst = [1,2,4,5]
[1,2,4,5] ==> ['lower','lower','higher','higher']
where 3
is the condition using the map function, is there an easy way?
Clearly map(lambda x: x<3, lst)
gets me pretty close, but how could I include a statement in map that allows me to immediately return a string instead of the booleans?