Lesson 11 of 34
if के अंदर if: Nested Conditions
8 min 30 XP
कभी-कभी दूसरा सवाल पहले सवाल का जवाब मिलने के बाद ही पूछा जा सकता है। तब एक if के अंदर दूसरा if लिखा जाता है, 4 spaces और अंदर।
Example: edit me and press Run
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.Indentation तय करता है कि कौन-सा else किस if का है। हर if और उसका else एक सीध में होने चाहिए।