C-17-Q002mediumsingle_mcq
In Python, the colon (:) placed at the end of an if condition serves to:
In Python, the colon (:) placed at the end of an if condition serves to:
- aTerminate the program
- bMark the start of the body of the
ifblock - cConvert the condition to a string
- dComment the line out
ব্যাখ্যা
In Python the colon marks the end of the header line and signals the start of the indented block that belongs to the if. It tells the interpreter that the statements following (and indented) form the body to run when the condition is true.