About 42,000 results
Open links in new tab
  1. What should I do with "Unexpected indent" in Python?

    Python uses spacing at the start of the line to determine when code blocks start and end. Errors you can get are: Unexpected indent. This line of code has more spaces at the start than the …

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

    How do I indent my code? The basic rule for indenting Python code is: Each statement in a basic block must be indented by the same amount. So technically the following Python program is …

  3. How can this "Unexpected Indent" error in Python be fixed?

    Jan 14, 2024 · If you just copy+pasted your code, then you used a tab on the line with the if statement. Python interprets a tab as eight spaces and not four. Don't ever use tabs with …

  4. How to fix IndentationError: unexpected indent in a Python script

    Oct 14, 2017 · How to fix IndentationError: unexpected indent in a Python script [duplicate] Asked 8 years, 1 month ago Modified 1 year, 10 months ago Viewed 28k times

  5. python - Why am I getting "IndentationError: expected an …

    File "<stdin>", line 2 a += 3 ^ IndentationError: unexpected indent The output states that he wasn't expecting an indent block line 2, then you should remove it. 3. "TabError: inconsistent use of …

  6. python - IndentationError: unexpected indent error - Stack Overflow

    How to deal with IndentationError: 1) Make sure your lines are indented properly, remembering that Python thinks that tab stops are every 8 columns. 2) Look for a missing colon on the line …

  7. Python IndentationError: unexpected indent - Stack Overflow

    Python IndentationError: unexpected indent [duplicate] Asked 13 years, 11 months ago Modified 1 year, 10 months ago Viewed 130k times

  8. python - Почему возникает ошибка IndentationError: …

    Feb 26, 2016 · Установил питон под Windows 10 64bit. Работает на Anaconda. Окружение python 3.4. Установил theano. import theano работает при построчном вводе в консоль. …

  9. Indentationerror: unexpected indent python - Stack Overflow

    Sep 10, 2015 · 2 In Python, indentation marks code blocks. They start under a line that ends with a colon :, and they end when the indentation ends. Since your first line which assigns the …

  10. indentation - Unexpected indent on Python? - Stack Overflow

    Oct 15, 2014 · IndentationError: unexpected indent I do not understand why, I was reading about python indentation, and as far I know if some statement is indented inside the block above it …