Ad
  • Custom User Avatar

    clever... shows mastery of language features and idioms.
    please never allow this into production code.
    to improve this, i would suggest...
    either add a long explanation of how this solves the problem
    at hand, or (preferably) simplify and make the logic more self explanatory, naming vars meaningfully to convey intent, injecting sparse comments to explain why (why are you doing these things in yr code?).
    if you do these things, the person that inherits your code when you move on to greener pastures
    will NOT curse you under their breath, but rather, will have only the highest praise for your professionalism and coding skills.

  • Custom User Avatar

    My bad. I totally missed the whole recursive part of the digit summing process.
    Please accept my sincere apologies.

  • Custom User Avatar

    Although unnecessary work in Python, I think this is a better solution for languages that do not support 10000 digit integers.

  • Custom User Avatar

    This kata is broken for Python 3