@manjunath24 : 
Its simpler to do this as `if password and len(password)` rather than a nested if.