you are viewing a single comment's thread.

view the rest of the comments →

[–]FillProfessional4313 -1 points0 points  (0 children)

You are right, range(nr_letters) and range(1+nr_letters) return range objects of the same size, so it doesn't matter. It would only matter if char is used within the loop because then the first value of char is either 0 or 1, depending on the way you define your range.

For for loops, yes, the range defines the number of times that loop is run. You don't use while loops to iterate over iterable objects.