def korea_big_number(n):
rlst = []
original_n = n
while True:
if n<(10**8):
rlst.append(n)
break
else:
rlst.append(n%(10**8))
n = n//(10**8)
rlst = zip(rlst, ["", '억', '조', '경', '해', '자', '양', '구', '간', '정', '재', '극', '항하사', '아승기', '나유타', '불가사의', '무량대수'])
rlst = list(reversed(list(rlst)))
r = " ".join([str(x)+y for x, y in rlst])
print(f"{original_n} ==> {r}")
return r
korea_big_number(1234)
korea_big_number(123456789)
korea_big_number(123456789123456789)
1234 ==> 1234
123456789 ==> 1억 23456789
123456789123456789 ==> 12조 34567891억 23456789
Out[448]:
'12조 34567891억 23456789'
댓글남기기