def passwordCheck(password): numbers = ["1", "2", "3", "4", "5", "6", "7", "8", "9"] for x in numbers: for y in password: if x == y: print "Sorry, but due to technical limitations, passwords can not contain numbers." return print "Your password is now " +password return