A nested conditional is an if statement placed inside the block of another if, elif or else. You use nesting when a second decision only makes sense after the first one has been made: first check that a user is logged in, then, only for logged-in users, check whether they are an administrator. The inner decision is not even considered unless the program has entered the outer block.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 5 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.