DEV Community

Discussion on: 10 Awesome Pythonic One-Liners Explained

Collapse
 
waylonwalker profile image
Waylon Walker

Great article, I really like the idea of the easily consumable content. I may think of how I can do something like this in my own way 😉


I am surprised that you made it through 10 one-liners with no ternary statement.

>>> 'Hi ' if 'Bob' in ['Alice', 'Bob', 'Pete'] else 'Goodbye'
'Hi'
Collapse
 
devmount profile image
Andreas

My pleasure 😊

I didn't cover everything on purpose, but I totally forgot about the ternary statement 😅 So thank you for this addition! 👍🏻