Skip to content Skip to sidebar Skip to footer
Showing posts with the label Ternary

Can I Conditionally Choose What Variable I Assign A Value To?

I know that you can do things like this in Python: var = value1 if( booleanCheck() ) else value2 W… Read more Can I Conditionally Choose What Variable I Assign A Value To?

Self-referencing Ternary

I've been doing this for a while: x = x if x else y In all sorts of contexts where x might be … Read more Self-referencing Ternary