PythonSkills.org
Courses
Exercices
Challenges
Quizzes
Open console
0 points
Get started
Loading...
Learnig Path /
Python List Comprehension
Ternary (if-else) expressions in list comprehensions
Loading...
Python Terminal
Loading Python...
If it doesn't load, refresh the page.
Loading...
Run Code
Clear
Previous lesson:
Using Functions in list comprehensions
Next Lesson:
Combining list comprehensions with Dictionaries or Sets
Exercices
10
Need Help? Go Back to the Lesson
Replace Negative Numbers with Zero
Label Numbers as Even or Odd
Convert Grades to Pass/Fail
Transform Numbers with Conditional Logic
Assign Age Categories
Capitalize Short Words and Lowercase Long Words
Mark Numbers as Positive, Negative, or Zero
Filter and Replace
Replace Missing Values
Label List Elements
0% complete
0/100
Python Basics
167 exercices
+
Lists Comprehension
100 exercices
+
Object-Oriented Programming
69 exercices
+