Ad
  • Custom User Avatar

    I'm new too starts about a week ago, for what I understand in enumerate the first i is index starting from 0. Each time it iterates the i will +1. So by using enumerate we have a default i that starts at 0 and +1 everytime. Since the i comes with the enumerate function itself thus we don't need to create another variable to increase p.

    so s += pow(int(c),p+i), p+i = 0 at the first time which is p itself, then p+1, p+2 ....

  • Custom User Avatar

    damn, this is so good.