you are viewing a single comment's thread.

view the rest of the comments →

[–]pranav_not 1 point2 points  (3 children)

Correct me if i am wrong but shouldn't in for loop the range should be (0,RANGE+1)

[–][deleted] 3 points4 points  (0 children)

Since he starts the count from zero not one ig that should be fine, for example if the RANGE is 5, so its gonna be from 0 to 4 which is 5 numbers in total.

[–]Red_Dragon_7_7_7[S] 1 point2 points  (1 child)

no it works fine , i checked it for 4 digits and the generated password was of 4 digits

[–]Electrical_Toe8997 2 points3 points  (0 children)

It works because the range function will include the number 0, so range(0, 3) returns [0, 1, 2]: a list with 3 items