- 1
Can you help me?
how to use "or" statement with "if" !! I want the script to be something like this:- x = me inp = input (' ') if inp == ('this'') or ('that'): print (x)
7 Respostas
0
Sorry you added jQuery in the tags. But the syntax are very close.
In Python you can use if inp == ('this') or inp == ('that').
+ 1
if (inp == ('this') || inp == ('that')) {}
If you want to use more then on condition in the ( ), you can use the || (or) and && (and).
+ 1
By the way thanks for the help.
looks like I used the correct code in my question
0
is this for python ???
0
Nope, this is for jQuery.
0
sorry but I need for python scripting !!
- 1
lol
I never added JQUERY in the tags.