Created
September 22, 2016 06:59
-
-
Save trinadhkoya/ff9363f9505b311a41b9853d1dcb6d45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a single * in python changes the whole thing | |
In this example ,i am working with backend server to validate my credentials.unfortunately i got the error like Wrong Credentials. | |
putting before * makes sense for me for that f****g problem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def log_in(user, password, security): | |
if user == "trinadh" and password == "password" and security == "secretkey": | |
print("Successful Log In") | |
else: | |
print("Wrong User Name or Password") | |
user_details = ["trinadh", "password", "secretkey"] | |
# in this ,though we are passing the data in a list ,it assumes as a single parameter | |
log_in(user_details) | |
# in this ,puttng star before the list data,splits the list data in to list lengh parameters(3) | |
log_in(*user_details) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment