2 Matching Annotations
  1. Oct 2018
    1. what is the value of number the second time Python executes the loop

      I find that this actually should be 1, because Python doesn't care what the object in the list is whether integer or string. It keeps looping until all objects in the list have been iterated. So the value of the 2nd number based on the fact that it is a list, shouldn't it be 1 since Python begins with 0 for a numbering system?

    1. Press the run button to try it and see.

      for those who copy and paste this code into an independent IDE like PyCharm, the window that shows Python closes instantly after the code is done running. You will need to add

      wn.exitonclick()

      to the end of the code for the window to stay open.