From bd3936ffa9dfcc0f9d419698961024a8571ae618 Mon Sep 17 00:00:00 2001 From: Tasnim Somo <136012642+Tasnimsomo@users.noreply.github.com> Date: Mon, 6 Oct 2025 08:55:45 -0500 Subject: [PATCH] Update 03_operators.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Fixed a small issue in the comparison operator examples. The original text described the `not in` operator but didn’t include a working example or had a typo. ## Changes Made - Added missing example for `not in` comparison - Corrected description from `(x in y)` to `(x not in y)` ## Why This Change Was Needed This makes the tutorial more accurate and consistent. The previous version could confuse beginners since the explanation didn’t match the examples. ## Example Output ```python print('B not in Asabeneh:', 'B' not in 'Asabeneh') # True --- 03_Day_Operators/03_operators.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/03_Day_Operators/03_operators.md b/03_Day_Operators/03_operators.md index 0fcfeb994..a2743980f 100644 --- a/03_Day_Operators/03_operators.md +++ b/03_Day_Operators/03_operators.md @@ -213,13 +213,13 @@ In addition to the above comparison operator Python uses: - _is_: Returns true if both variables are the same object(x is y) - _is not_: Returns true if both variables are not the same object(x is not y) - _in_: Returns True if the queried list contains a certain item(x in y) -- _not in_: Returns True if the queried list doesn't have a certain item(x in y) +- _not in_: Returns True if the queried list doesn't have a certain item(x not in y) ```py print('1 is 1', 1 is 1) # True - because the data values are the same print('1 is not 2', 1 is not 2) # True - because 1 is not 2 print('A in Asabeneh', 'A' in 'Asabeneh') # True - A found in the string -print('B in Asabeneh', 'B' in 'Asabeneh') # False - there is no uppercase B +print('B not in Asabeneh', 'B' in 'Asabeneh') # False - there is no uppercase B print('coding' in 'coding for all') # True - because coding for all has the word coding print('a in an:', 'a' in 'an') # True print('4 is 2 ** 2:', 4 is 2 ** 2) # True