0
How can I use two if ?
3 Answers
+ 3
Do you need to use an if statement inside another if statement? Or one after the other?
In the first case:
if(condition):
if(condition):
else:
This indentation must be followed.
In the second case:
You must use if.... elif/else if..... else
if(condition1):
......
else if(condition2):
......
else():
......
This indentation must be followed.
+ 1
You can use else if statement and, yes, you can use two or multiples if
0
Chandana Pasunooti I tried the first way (using two ifs) didn't work out , but second one is ok .đ