About 35,000 results
Open links in new tab
  1. Indentation of an IF-ELSE block in Python - Stack Overflow

    Jan 14, 2021 · 3 Getting the indentation correct isn't really a Python issue but rather an issue with the editor that you're using for your source code. Most editors that understand Python will correctly add …

  2. Python's interpretation of tabs and spaces to indent

    In Python 3, the rules are slightly different (as noted by Antti Haapala). Compare: Python 2 on Indentation Python 3 on Indentation Python 2 says: First, tabs are replaced (from left to right) by one …

  3. Python: using 4 spaces for indentation. Why? - Stack Overflow

    While coding python I'm using only 2 spaces to indent, sure PEP-8 really recommend to have 4 spaces, but historically for me it's unusual. So, can anyone convince me to use 4 spaces instead of 2? ...

  4. Python Indentation (for loop) - Stack Overflow

    Sep 17, 2015 · As everyone else has pointed out, in Python, indentation is meaningful. Code blocks should be indented. For example, an loop should be indented like this: [pseudocode]

  5. python - I'm getting an IndentationError (or a TabError). How do I fix ...

    How can I write an empty indented block (and avoid an IndentationError) in Python? for cases where everything is lined up as it should be, except that there was a deliberately empty indented block …

  6. python - Proper indentation for multiline strings? - Stack Overflow

    Other than that, multiline string literals in Python are unfortunately what-you-see-is-what-you-get in terms of whitespace: all characters between the string delimiters become part of the string, including …

  7. Is there a way around coding in Python without the tab, indent ...

    Pythons' indentation rules are meant to father everybody into following some lame rules.If indentation rules are so popular,make them optional.

  8. Python indentation, allignment of IFs and ELSEs - Stack Overflow

    Mar 7, 2013 · Python indentation, allignment of IFs and ELSEs Asked 12 years, 9 months ago Modified 12 years, 9 months ago Viewed 515 times

  9. Python function argument list formatting - Stack Overflow

    Python function argument list formatting Asked 14 years, 5 months ago Modified 1 year, 8 months ago Viewed 86k times

  10. Automatic indentation for Python in Notepad++ - Stack Overflow

    Feb 18, 2017 · I played a bit with python in Notepad++ and I had a problem with the tab. Since in python your indentation is really important but notepad ++ put space instead of a tab.