In python:
def password_check(newpassword, oldpassword):
return True if newpassword != oldpassword and len(newpassword) >= 6 else False
Just for clarification, that return statement is on one line. I hope this helps!
9.5m questions
12.2m answers