Python Whitespace for indenting

0 votes
Which is the best way to type whitespaces for indentation in Python? Using the space key or the tab key?
Jun 12, 2018 in Python by nightshade
• 870 points
24 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
PEP-8 recommends creating indents by tapping the spacebar four times rather than using tabspace. However, these things are a matter of convention only. Better stick to PEP-8 for that reason.
answered Jun 12, 2018 by Hamartia's Mask
• 1,580 points

Related Questions In Python

0 votes
1 answer

Unique identification for data items in Python

Try the UUID module of Python. For example, ...READ MORE

answered Apr 17, 2018 in Python by Nietzsche's daemon
• 4,260 points
24 views
0 votes
3 answers
0 votes
1 answer

Slice notation in Python for string reversal

The slice notation is [start:end:step]. Step = ...READ MORE

answered Apr 25, 2018 in Python by Nietzsche's daemon
• 4,260 points
64 views
0 votes
1 answer

Replacements for switch statement in Python?

You could use a dictionary: def f(x): ...READ MORE

answered May 29, 2018 in Python by ariaholic
• 7,320 points
19 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
67 views
+4 votes
6 answers
0 votes
1 answer

Increment operators in Python

Python has no unary operators. So use ...READ MORE

answered May 11, 2018 in Python by Hamartia's Mask
• 1,580 points
61 views
0 votes
1 answer

Do-while loop in Python

Python does not have a do-while construct.  If ...READ MORE

answered May 11, 2018 in Python by Hamartia's Mask
• 1,580 points
73 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.