in Decorators video, need to understand the if condtion.
if username in users and users[username] == password,
How is user[username] getting equivalent to password, is it indexing or something else?
in Decorators video, need to understand the if condtion.
if username in users and users[username] == password,
How is user[username] getting equivalent to password, is it indexing or something else?
Hello @pratyush_007, yes we defined it as a dictionary, take it like a kind of mapping. So we can map our content equivalent to password or the username using users[username] or users[password]
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.