Getting Python Code Indentation Right
Indentation is very important in Python and PEP 8 lays out a couple of rules for it:
- Use four consecutive spaces to indicate indentation
- Prefer spaces over tabs.
This lesson will show you how to apply these two rules and the different ways you can use indentation to improve readability.
Comments & Discussion
Become a Member to join the conversation.