Course contentsShow
Python
Lesson 358 of 1,2898. ListsPro lesson

Conditional expression in comprehension

`[x if c else y for x in lst]`.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.