Mega Code Archive

 
Categories / Python Tutorial / Buildin Function
 

Range()

print range(2, 19, 3) # If step is omitted and only two arguments given, step takes a default value of 1. print range(3, 7) for eachVal in range(2, 19, 3):       print "value is:", eachVal