we can use the range (function in for loops to iterate through sequence of numbers it can be combined with the len (function to iterate through sequence using indexing here is an example program to iterate through list using indexing city ['pune''mumbai''delhi'iterate over the list using index for in range(len(city))print (" like"city[ ]outputi like pune like mumbai like delhi for loop with elsea for loop can have an optional else block as well the else part is executed if the items in the sequence used in for loop exhausts the break keyword can be used to stop for loop in such casesthe else part is ignored hencea for loop' else part runs if no break occurs exampledigits [ for in digitsprint(ielseprint("no items left "when you run the programthe output will be no items left herethe for loop prints items of the list until the loop exhausts when the for-loop exhaustsit executes the block of code in the else and prints no items left this for else statement can be used with the break keyword to run the else block only when the break keyword was not executed exampleprogram to display student' marks from record student_name 'soyujmarks {'ram' 'shayam' 'sujit'