Python Forum
Problem with For loop indentation
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with For loop indentation
#11
This effect come from how the parser works. The first indentation counts. If you indent with 3 white spaces, you have to continue this indentation. If you're using something different from 4 whitespace, then you'll always have problems, if you copy & paste code from different sources.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  problem program runs in a loop jasserin 0 1,317 May-18-2024, 03:07 PM
Last Post: jasserin
  While Loop Problem Benno2805 1 1,640 Sep-06-2023, 04:51 PM
Last Post: deanhystad
  Loop reading csv file problem faustineaiden 1 2,643 Dec-11-2021, 08:40 AM
Last Post: ibreeden
  Infinite loop problem Zirconyl 5 5,346 Nov-16-2020, 09:06 AM
Last Post: DeaD_EyE
  Dataframe mean calculation problem: do we have to loop? sparkt 1 3,383 Aug-28-2020, 02:41 PM
Last Post: sparkt
  Python loop problem Kristenl2784 11 8,642 Jun-18-2020, 07:22 PM
Last Post: buran
  Problem with append list in loop michaelko03 0 2,568 Feb-16-2020, 07:04 PM
Last Post: michaelko03
  problem with for loop using integers python_germ 5 4,777 Aug-31-2019, 11:42 AM
Last Post: jefsummers
  problem in loop roseojha 3 3,572 Aug-26-2019, 09:03 AM
Last Post: perfringo
  Nested while loop problem + turtle DreamingInsanity 3 4,904 Jul-06-2019, 02:01 PM
Last Post: DreamingInsanity

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.