From 10699395433f15b36d5b7d83e10c2a9473fe8ce0 Mon Sep 17 00:00:00 2001 From: zhangfelix Date: Fri, 19 Jun 2020 18:29:21 +0800 Subject: [PATCH] bug fix in gcd.md There is a function-redefined bug in origin code. This PR uses an alias to fix the bug. --- snippets/gcd.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/gcd.md b/snippets/gcd.md index 190619f7e..c72285fd1 100644 --- a/snippets/gcd.md +++ b/snippets/gcd.md @@ -9,10 +9,10 @@ Use `functools.reduce()` and `math.gcd()` over the given list. ```py from functools import reduce -from math import gcd +from math import gcd as gcd_from_math def gcd(numbers): - return reduce(gcd, numbers) + return reduce(gcd_from_math, numbers) ``` ```py