The sign-up form shows a message for every rule a password breaks. The rules, in this order, are:
"length": at least 8 characters"digit": at least one digit"upper": at least one upper-case letter"space": no spacesWrite a function broken_rules(password) that returns a list of the names of the rules the password breaks, in the order above. A password that passes everything gives an empty list.
How it's checked
Your code runs, then the check below runs and its printed output is compared with ours.
broken_rules("hello world") returns ["digit", "upper", "space"]Hints, the later steps and the answer come with Pro.
def broken_rules(password):
...