Skip to content

Commit 416d261

Browse files
committed
Update GCD.py
1 parent ae253fe commit 416d261

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

misc/GCD.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
"""
1616

1717
def greatest_common_divisor(x,y):
18-
if(y == 0):
19-
return x
20-
else:
21-
return greatest_common_divisor(y,x%y)
18+
return x if y == 0 else greatest_common_divisor(y,x%y)
2219

2320
if __name__ == "__main__":
2421
print(greatest_common_divisor(20,25))

0 commit comments

Comments
 (0)