in a range : in « Buildin Function « Python






in a range

in a range

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.in function demoin function demo
2.in can be applied to any 'iterable' objectin can be applied to any 'iterable' object