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
• 880 points
633 views

1 answer to this question.

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
1,152 views
0 votes
3 answers

Python Selenium best tutorials for beginners

Hope this will help you...Python Tutorial READ MORE

answered Feb 11, 2019 in Python by aldrinjohn
• 140 points
3,932 views
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
680 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 aryya
• 7,460 points
729 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,437 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,073 views
0 votes
1 answer

Increment operators in Python

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

answered May 12, 2018 in Python by Hamartia's Mask
• 1,580 points
979 views
0 votes
2 answers

Do-while loop in Python

A more pythonic way would be this: ``` while ...READ MORE

answered Jul 6, 2020 in Python by Composer3
1,400 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