From 4643e3af28e9eaca69cfe1d8ec93f3f8d0a1834e Mon Sep 17 00:00:00 2001 From: mithunbabbira Date: Sun, 19 Jul 2026 15:51:56 +0530 Subject: [PATCH] fix: parenthesize multiple exception types in greatest_common_divisor --- maths/greatest_common_divisor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maths/greatest_common_divisor.py b/maths/greatest_common_divisor.py index ce0abc664cf9..1fc123fc2b14 100644 --- a/maths/greatest_common_divisor.py +++ b/maths/greatest_common_divisor.py @@ -73,7 +73,7 @@ def main(): f"{greatest_common_divisor(num_1, num_2)}" ) print(f"By iterative gcd({num_1}, {num_2}) = {gcd_by_iterative(num_1, num_2)}") - except IndexError, UnboundLocalError, ValueError: + except (IndexError, UnboundLocalError, ValueError): print("Wrong input")