+ 7
When does a new block begin in python?
Please tell me as soon as possible
5 Respostas
+ 2
Ashish Yadav
You can create a new block using indentation
+ 2
Ashish Yadav
A block begins also with one or more spaces which is called as an indentation
It's not by 4 spaces only
If you can't believe it just see the code below
https://code.sololearn.com/cFjZ5x2CeGhj/?ref=app
+ 1
Unlike other languages python uses identation operator rather than curly brackets.
Example :
if(x<9)
if(x>3)
This is a nested if statement. You can notice a space before the second if right that's identation.
+ 1
A block is indented code that starts right after a colon and ends when the indentation ends.