what is the method to write code-block in python .explain with example
Answers
Answered by
3
Answer:
To indicate a block of code in Python, you must indent each line of the block by the same whitespace. The two lines of code in the while loop are both indented four spaces. It is required for indicating what block of code a statement belongs to.
Explanation:
A little example
def each(iterable, block):
for e in iterable:
block(e) # step into -> 6: with each(range(0, 10)) << 'x':
print('element ' + str(x))
That with statement is a special statement that
Answered by
1
Answer:
To indicate a block of code in Python ,you must indent each line of the block by the same whitespace.The two lines of code in the white loop are both indented four spaces.It is require for indicating what of code a statements belongs to.
Hope it helps!
please mark me as brainilest
please follow permanently and take 10 thanks in return
Similar questions