(n, base)
return [n % base] + number_to_lower_endian(n // base, base)
Helper function: convert a number to a list of digits in the given base.
Helper function: convert a number to a list of digits in the given base.
Helper function : convert a number to a list of digits in the given base .
def number_to_lower_endian(n, base):
  """Helper function: convert a number to a list of digits in the given base."""
  if n < base:
    return [n]
  return [n % base] + number_to_lower_endian(n // base, base)
def number_to_lower_endian ( n , base ) : if n < base : return [ n ] return [ n % base ] + number_to_lower_endian ( n // base , base )