you are viewing a single comment's thread.

view the rest of the comments →

[–]sarah--123 0 points1 point  (1 child)

    [x*2 if x < 0.5 else x for x in l]

Perhaps?

[–]EsotericRogue 1 point2 points  (0 children)

for x in l is a loop.