Answers for "python convert int to base64"

0

python convert number to base

def numberToBase(n, b):
    if n == 0:
        return [0]
    digits = []
    while n:
        digits.append(int(n % b))
        n //= b
    return digits[::-1]
Posted by: Guest on September-12-2021

Python Answers by Framework

Browse Popular Code Answers by Language