range with step : range « Buildin Function « Python






range with step

range with step

from math import sqrt

for n in range(99, 0, -1):
    root = sqrt(n)
    if root == int(root):
        print n
        break

           
       








Related examples in the same category

1.Assigning Consecutive ValuesAssigning Consecutive Values
2.Demonstrates the range() functionDemonstrates the range() function
3.range() function with steprange() function with step
4.Demonstrates the range() function with negative step
5.range() Functionrange() Function
6.Demo the range functionDemo the range function
7.range function with stepsrange function with steps