Feb-07-2020, 01:12 AM
The easiest way I know is to add a count to each time through the loop:
attempts = 0 while True: attempts += 1 if attempts < 5: #check password else: break