Commit adfe6355 authored by Taddeus Kroes's avatar Taddeus Kroes

Moved some common functions to 'utils'

parent 21186ede
#!/usr/bin/env python
def digits(n):
return [n] if n < 10 else digits(n / 10) + [n % 10]
from utils import digits
def quad(n):
return n * n
......
def digits(n):
return [n] if n < 10 else digits(n / 10) + [n % 10]
def _gcd(a, b):
while b:
a, b = b, a % b
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment