what is used to define a block of code in python

Solutions on MaxInterview for what is used to define a block of code in python by the best coders in the world

showing results for - "what is used to define a block of code in python"
Kaylin
28 May 2019
1# usually use 4 spaces to indent block (don't mix with TABs or IndentationError)
2j = 1
3site = 'cg'
4while(j<= 1):
5    if site == 'cg': 
6        print('okay') 
7    else: 
8        print('retry') 
9    j += 1
10    print ('j: ' + str(j))
11print('Done') 					# okay          j: 2        Done