From 7d1f321717be5fd0b955a156122d4d0ad7bc853e Mon Sep 17 00:00:00 2001 From: Kristen Kinnear-Ohlmann Date: Thu, 21 Mar 2019 08:39:18 -0500 Subject: [PATCH] Clarified first 2 sentences (#27490) Updated word order and added comma in the first sentence to clarify meaning. Standardized the order and look of if/elif/else to match main article on the topic. --- guide/english/python/ternary-operator/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/english/python/ternary-operator/index.md b/guide/english/python/ternary-operator/index.md index a900f733ac..7ce6643cd4 100644 --- a/guide/english/python/ternary-operator/index.md +++ b/guide/english/python/ternary-operator/index.md @@ -2,9 +2,9 @@ title: Python Ternary Operater --- # Ternary operator in Python -Ternary operations in Python, often also referred to as conditional expressions allow the programmer to perform an evaluation and return a value based on the truth of the given condition. +Ternary operations in Python, also often referred to as conditional expressions, allow the programmer to perform an evaluation and return a value based on the truth of the given condition. -The ternary operator differs from a standard `if`, `else`, `elif` structure in the sense that it is not a control flow structure, and behaves more like other operators such as `==` or `!=` in the Python language. +The ternary operator differs from a standard `if`/`elif`/`else` structure in the sense that it is not a control flow structure, and behaves more like other operators such as `==` or `!=` in the Python language. ### Example In this example, the string `Even` is returned if the `val` variable is even, otherwise the string `Odd` is returned. The returned string is then assigned to the `is_even` variable and printed to the console.