Computer Science

In Python, which of the following will create a block in a compound statement?

  1. colon
  2. statements indented at a lower, same level
  3. indentation in any form
  4. {}

Python Control Flow

2 Likes

Answer

statements indented at a lower, same level

Reason — In Python, a block in a compound statement is created by indenting the statements to the same level.

Answered By

1 Like


Related Questions