[Tutor] How to print something just after 3 attempts?

bob gailer bgailer at gmail.com
Tue Jul 17 18:11:48 CEST 2012


Simpler solution:

for i in range(3):
   if input("Password: ") == "unicorn":
     print("Welcome in..")
     break
else:
   print("That must have been complicated..")

-- 
Bob Gailer
919-636-4239
Chapel Hill NC



More information about the Tutor mailing list