0
What's purpose of nested if in Python ?
2 ответов
+ 3
im python or in any other language, nested if is normally used where multiple levels of conditions are apply like multiple or single conditions inside a condition.simple ex:
do you live in asia (if yes)
{
do you live in India(if yes)
{
1. do you live in mumbai?
2. do you live in delhi?
.....and so on...
}
do you live in china(if yes)
{
1. do you live in Shanghai?
2. do you live in Beijing?
... and so on...
}
and as many conditions you want to check...
}
you can make any number or levels as you want..
i hope it helps...
+ 1
Pradeep Kumar Prajapati Thanks