Hello,
Does anyone know a way of taking digits of a number, putting into a list, and adding them together quicker than this?
Does anyone know a way of taking digits of a number, putting into a list, and adding them together quicker than this?
while x>0: t.append(x%10) l+=x%10 x=(x-x%10)//10In which 'l' is the sum, and x is the number.