for x in range(10):for y in range(x):print(y) code example
Example 1: for i in range python
#coding: utf-8
for item in range(10):
print(item)
Example 2: find the range in python
def find_range(n):
lowest = min(n)
highest = max(n)
# Find the range
r = highest - lowest
return lowest, highest, r
# src : Doing Math With Python