TypeError: el objeto 'int' no admite la asignación de elementos
¿Por qué me sale este error?
a[k] = q % b
TypeError: 'int' object does not support item assignment
Código:
def algorithmone(n,b,a):
assert(b > 1)
q = n
k = 0
while q != 0:
a[k] = q % b
q = q / b
++k
return k
print (algorithmone(5,233,676))
print (algorithmone(11,233,676))
print (algorithmone(3,1001,94))
print (algorithmone(111,1201,121))