The range function wil give you a list of numbers, while the for loop will iterate through the list and execute the given code for each of its items. for i in range(5): print i. This simply executes print i five times, for i ranging from 0 to 4. for i in range(5): a=i+1. This will execute a=i+1 five times. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.