From e9d6fa8d53d95f1fc04c3bf2636a0a9a6baff1d2 Mon Sep 17 00:00:00 2001 From: Swayam9705 <164738480+swayam9705@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:27:14 +0530 Subject: [PATCH] Added more readability to the return statement --- boolean_algebra/not_gate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boolean_algebra/not_gate.py b/boolean_algebra/not_gate.py index cfa74cf42204..ba56c3b38e05 100644 --- a/boolean_algebra/not_gate.py +++ b/boolean_algebra/not_gate.py @@ -21,7 +21,7 @@ def not_gate(input_1: int) -> int: 0 """ - return 1 if input_1 == 0 else 0 + return int(not bool(input_1)) if __name__ == "__main__":