tubeshowcase●1,111,514 videos♡ My collection 0
← Learn to Code

Learn to Code02:59

Python's ternary operator

mCoding ↗

From the creator

It's not so hidden! Yes, like nearly every modern programming language Python also has a ternary operator, although it doesn't refer to it as such. While other languages typically use "?", Python chose to use "if". ― mCoding with James Murphy (https://mcoding.io) Source code: https://github.com/mCodingLLC/VideosSampleCode Conditional expressions docs: https://docs.python.org/3/reference/expressions.html#conditional-expressions PEP introducing conditional expressions: https://peps.python.org/pep-0308/ How Python determines if x is truthy: https://youtu.be/fpN2ieYxXO0 Default mutable arguments: https://youtu.be/2iw8VKsS6-Y SUPPORT ME ⭐ --------------------------------------------------- Sign up on Patreon to get your donor role and early access to videos! https://patreon.com/mCoding Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.) https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE Want to donate crypto? Check out the rest of my supported donations on my website! https://mcoding.io/donate Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, Mark M, Mutual Information BE ACTIVE IN MY COMMUNITY 😄 --------------------------------------------------- Discord: https://discord.gg/Ye9yJtZQuN Github: https://github.com/mCodingLLC/ Reddit: https://www.reddit.com/r/mCoding/ Facebook: https://www.facebook.com/james.mcoding

Published 2023-03-27 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code