fix identation

This commit is contained in:
Rohit Tanwar
2018-01-08 19:58:27 +05:30
parent 099b44fcd6
commit fd42cd7994

View File

@ -7,8 +7,8 @@ The `helperGcdfunction` uses recursion. Base case is when `y` equals `0`. In thi
Uses the reduce function from the inbuild module `functools`. Also defines a method `spread` for javascript like spreading of arrays.
``` python
from functools import reduce
def spread(arg):
from functools import reduce
def spread(arg):
ret = []
for i in arg:
if isinstance(i,list):
@ -16,7 +16,7 @@ Uses the reduce function from the inbuild module `functools`. Also defines a met
else:
ret.append(i)
return ret
def gcd(*args):
def gcd(*args):
numbers = []
numbers.extend(spread(list(args)))
def helperGcd(x,y):