@anonymous/

ThatBraveIberianmidwifetoad

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
def r2(n,b):
 # `n` is the base 10 integer and `b` is the base to convert to
 assert b>=2,'Not a valid base to convert to! Base must be >=2!'
 p=[]
 while 1:
  p.append(chr(55+(n%b))if n%b>9 else str(n%b));n=n//b
  if n<1:break
 print(''.join(p[::-1]))
r2(431,20)