From a6884ba38042c93f0f5f3174be04f28c532c9f18 Mon Sep 17 00:00:00 2001 From: Lars Johansen Date: Tue, 16 Sep 2025 11:00:01 -0700 Subject: [PATCH] fix: Fixed ordering of ternary operator --- docs/cheatsheet/control-flow.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/cheatsheet/control-flow.md b/docs/cheatsheet/control-flow.md index 3547c4e5..5abc361f 100644 --- a/docs/cheatsheet/control-flow.md +++ b/docs/cheatsheet/control-flow.md @@ -207,13 +207,13 @@ Ternary operators can be chained: >>> print('kid' if age < 13 else 'teen' if age < 18 else 'adult') >>> # is equivalent to this if statement: ->>> if age < 18: -... if age < 13: -... print('kid') -... else: -... print('teen') +>>> if age < 13: +... print('kid') ... else: -... print('adult') +... if age < 18: +... print('teen') +... else: +... print('adult') ... # output: teen ```