0
why does the random.randint(1, 6) produce the no. 6? i thought it would only produce no. from 1 to 5?
2 Answers
+ 2
I think you're getting confused because things like lists start with their first item at 0. Quite simply randint(a, b) generates a random integer from a to b inclusive.
0
thanks!