prices = [ .75, 2.25, 1.50, 3.0, 2.5, .50, .90, .85 3.5]
What's the simplest way to return values >= 2
from the list.
I seen some code in Github and google but I can't get to work. I'm learning how to code in python 3.
prices = [.75, 2.25, 1.50, 3.0, 2.5, .50, .90, .85 3.5]
prince = sorted(i for i in j if i >= 2)
print(j2)
I expect this result [2.25, 2.5, 3.0, 3.5]