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!
6.5m questions
8.7m answers