So, I\'m currently learning python and I recently created a script that contains two functions, one that creates an account for the user and another that logs the user into thei
VS code here just reminds you that you have declared a variable Li but didn't use anywhere further. You are assigning your Li variable True or False value, but what is the practical need for that? Because you currently don't associate any further logic with Li variable, you can simply omit it for now:
if accounts[user2] == pass2:
return "You are now logged in"
else:
return "Try again, your username and password was incorrect"
However, if you will add a real use-case for your variable further, warning from VS code will disappear as well, for example:
if accounts[user2] == pass2:
Li = True
return "You are now logged in"
else:
Li = False
return "Try again, your username and password was incorrect"
if Li:
doSomeStuff()