Skip to content

Glossary: Data Visualization

Conditional expression

Also written: ternary expression, x if cond else y

A one-line choice in Python like `"#c2410c" if focus else "#cccccc"`, which gives the first value when the test is true and the second otherwise. It lets one loop color the highlighted line differently.

Where the book teaches it

Related terms

Highlight