Ad
  • Custom User Avatar

    The most important thing here is the list comprehension (sum(int(x)) for x in str(value)

    It is nothing but a for loop, you will write hundreds of for loops until it just clicks that what you're trying to do is this essential form, and then it comes naturally.

    the more you see it the more obvious it gets