Articles → Python → How To Indent And Dedent The Code In Python IDLE

How To Indent And Dedent The Code In Python IDLE






How To Indent?




Picture showing the sample code to be indented

Click to Enlarge



  1. Select the lines of code you want to indent.
  2. Go to Format → Indent Region
Picture showing the Indent Region option in the Format menu of IDLE

Click to Enlarge



Picture showing the sample code after indentation

Click to Enlarge


How To Dedent The Code?




  1. Select the lines of code you want to dedent.
  2. Go to Format → Dedent Region
Picture showing the Dedent Region option in the Format menu of IDLE

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Sunday, January 27, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250