0

What Is the Significance of : when and where to put the :

1st Feb 2017, 8:32 AM
Kavit Shah
Kavit Shah - avatar
2 Answers
+ 1
I don't know the real context of your question, but I guess you must read 'where' instead 'when'... ( answer is probably 'after the else keyword' if I believe your question tags )
1st Feb 2017, 8:39 AM
visph
visph - avatar
0
no, they are talking about ":" You put the ":" when you are about to enter a sub-block of code (i.e. after an if, elif, else, for, while, def, class statement). It tells the interpreter to look for a indented block after it.
1st Feb 2017, 10:45 PM
Amaras A
Amaras A - avatar