"""Nested loops""" # for and while loops can be nested: for i in range(4) : for j in range(3) : print i,j print # the range of the inside loop can depend on # that of the outer loop: for i in range(10) : for j in range(i, 10) : print '*', print # a nested loop that prints a multiplication table: for i in range(1,11) : for j in range(1,11) : print i*j,'\t', print