Indentation of Python in Notepad

0 votes

In Matlab we can use ctrl + i for smart indentation. is there any similar method to do the same in Notepad++ for Python?

For example, I want to indent the following block:

Text A

Text B

Text C

to:

        Text A

        Text B

        Text C

Sep 18, 2018 in Python by ana1504.k
• 7,910 points
2,102 views

1 answer to this question.

0 votes

To indent the block, select the entire text and press Tab. If you want to unindent the text, select and press shift + Tab

In case of a normal text file, it will give tabs but in case of a python file (.py) it will automatically provide four spaces instead of tabs.

answered Sep 18, 2018 by SDeb
• 13,300 points

Related Questions In Python

+2 votes
3 answers

what is the practical use of polymorphism in Python?

Polymorphism is the ability to present the ...READ MORE

answered Mar 31, 2018 in Python by anto.trigg4
• 3,440 points
4,312 views
+4 votes
6 answers

Use of "continue" in python

The break statement is used to "break" ...READ MORE

answered Jul 16, 2018 in Python by Omkar
• 69,210 points
1,215 views
+1 vote
8 answers

Count the frequency of an item in a python list

To count the number of appearances: from collections ...READ MORE

answered Oct 18, 2018 in Python by tinitales
35,269 views
0 votes
1 answer

How can I compare the content of two files in Python?

Assuming that your file unique.txt just contains ...READ MORE

answered Apr 16, 2018 in Python by charlie_brown
• 7,720 points
2,374 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,077 views
0 votes
1 answer
0 votes
1 answer

Is arr.__len__() the preferred way to get the length of an array in Python?

my_list = [1,2,3,4,5,6,7] len(my_list) # 7 The same works for ...READ MORE

answered Oct 8, 2018 in Python by SDeb
• 13,300 points
708 views
0 votes
1 answer

Set of modules in Python

NumPy, SciPy, psutil, Matplotlib modules are supported. ...READ MORE

answered Nov 14, 2018 in Python by SDeb
• 13,300 points
442 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP