double loops python code example
Example 1: how to exit a double loop in python
for word1 in buf1:
find = False
for word2 in buf2:
...
if res == res1:
print "BINGO " + word1 + ":" + word2
find = True
break # <-- break here too
if find:
break
Example 2: double in python
print("Their is nothing like double in python ")
print("In python float is used for decimals input")
# Example
num = float(input("Enter any decimal Number"))
print(type(num))