I have made small script with Python that brute forces given word and when it finds the word, it should stop.
from itertools import product
rangeone = int(raw_input("Set range1: "))
rangetwo = int(raw_input("Set range2: "))
question = raw_input("Give password: ")
alphabets = 'abcdefghijklmnopqrstuvwxyz1234567890'
for random in range(rangeone, rangetwo):
    loops = product(alphabets, repeat=random)
    for y in loops:
        password = ''.join(y)
        if password == question:
            print "done"
            break
But, it doesn't break the loop. It keeps going
 
     
    