0
Why doesn't this if statement work
elif web != "www.sololearn.com" or "https://www.sololearn.com": ^ i input https://www.sololearn.com and got the Spoof Link, why? EDIT: even www.sololearn.com doesn't work https://code.sololearn.com/ck8Ruk2vhpgK/?ref=app
3 Answers
+ 4
Use "and" instead of "or" in if statement, because this way it can't be True, because it evaluates True only if string is both www.sololearn.com and https://www.sololearn.com which is impossible
+ 3
TheCoder920 the condition should be:
elif web != "www.sololearn.com" and web != 'https://www.sololearn.com':
EDITED:
Note the 'and' instead of 'or'.
0
Awesome! It works!! Thanks people!!!