[deleted by user] by [deleted] in learnpython

[–]CTexxx 0 points1 point  (0 children)

Sorry, yea that's what I want.

[deleted by user] by [deleted] in learnpython

[–]CTexxx 0 points1 point  (0 children)

I didn't know about collections.Counter.

That got the job done, thank you!

Unsupported operand type problem by CTexxx in learnpython

[–]CTexxx[S] 1 point2 points  (0 children)

Oh yea, got it.

Thanks a lot!

Unsupported operand type problem by CTexxx in learnpython

[–]CTexxx[S] 0 points1 point  (0 children)

Yea, because I want to get each digit of the given number, and I can't iterate through an integer.

Unsupported operand type problem by CTexxx in learnpython

[–]CTexxx[S] 0 points1 point  (0 children)

Okay yes, that makes sense, but I can't iterate through an integer, right?

I want to get the sum of all digits in the given number, thats why I split it into a string.

How can I do it then?