Python Ternary Operator

preview_player
Показать описание
Python ternary operator with list comprehension. In this video, you will learn how to simplify condition statement blocks using ternary operators. You will also learn how to chain the ternary operators in the given example.

Python Playlist:

Subscribe for more coding tutorials 😄!
Рекомендации по теме
Комментарии
Автор

I did a ‘single line ternary operator with for loop’ on the 2nd problem:

Results = [0 if n == “None” else n+5 for n in grades]

iamtiredtomorrow
welcome to shbcf.ru