def reverse(num):
digits = []
leng = num.count
num1 = int(num)
n = 0
while(n < leng):
last = num1 % 10
num1 = (num1 - last) / 10
last = str(last)
digits = digits.append(last)
n = n + 1
When I run this block it gives an error on the line with the while loop, saying < is not valid between an 'int' and 'builtin_function_or_method'. How do I save leng as an int?