Computer Science

What is the common structure of Python compound statements?

Python Control Flow

40 Likes

Answer

The common structure of a Python compound statement is as shown below:

<compound statement header>:
    <indented body with multiple simple\
     and/or compound statements>

It has the following components:

  1. A header line which begins with a keyword and ends with a colon.
  2. A body containing a sequence of statements at the same level of indentation.

Answered By

21 Likes


Related Questions