i am not able to understand the if statement in In[4], “if username in users” till this i get it but, what is the need of “and users[username]”
Python Functions-Decorators
Hey Ishika,
Our function here takes the value of Username and Password in this case. Consider it as a simple login function. For some credentials entered by a user if we want to allow that user to pass through, we must check whether the entered Username even matches with any username of the users (stored in the dictionary) as well as check the Password for that user. To check password, we execute that statement of
users[username] == Password
We are checking that the entered password for a particular username matches the actual password or not.
I hope you understand it now
I hope your doubt has been resolved?