def translate(a, b=2):
if type(a)==int and type(b)==int:
L=list()
while a//b!=0:
d=a%b
c=0
c=a//b
a=c
L.append(d)
F=list()
F= L.sort(reverse=True)
P=''
L=map(str, F)
P=''.join(L)
return P
Выдает ошибку:
Error:
Traceback (most recent call last):
File "jailed_code", line 31, in
print(translate(int(n)))
File "jailed_code", line 20, in translate
L=map(str, F)
TypeError: 'NoneType' object is not iterable