Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Looping: Definite Iteration

Give Feedback

The most common use for the range function is looping. In computer science, a loop is a structure that allows you to run a block of code multiple times without having to write that code over and over again. One type of loop that Python supports is the for loop:

for name in names:

This loop will execute for each name in the list. name is simply a temporary variable that will change on each loop.

mosc0 on Oct. 29, 2019

great info. i knew a some about it but it unclogged my mind. one question though, I have seen them using range in def functions functions. do you have a video about this?

Austin Cepalia RP Team on Nov. 2, 2019

@mosc0 I’m not exactly sure what you mean? Can you provide a code example?

Become a Member to join the conversation.