Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 11 Online
OpenStudy (anonymous):

Can anyone explain for num in range(5): ? Thanks

OpenStudy (rsmith6559):

Range creates an iterable object that wiill retun the values from 0 to 4. In Python, an index is JUST below the value i points to. If range is called with two arguments, they're the start and stop values. A third value would be the step value, how much the variable is adjusted each iteration.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!