Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reset csv.reader
#8
(Jul-30-2018, 05:28 PM)Huck Wrote: I kept getting blue = 7 until I put that break in the first loop. I didn't think I needed it either.
It was the loop that is a problem, the break was a way to solve the problem caused by the unnecessary loop. You were getting 7, because with the loop if id is double-digit, it will count it twice, i.e. every double-digit id is double-counted, if you had 3-digit ids, they will be triple-counted, etc.

try to find a way to explain what you are doing and let us know. Also it MAY be possible to fix the sql statement itself.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
Reset csv.reader - by Huck - Jul-30-2018, 03:25 PM
RE: Reset csv.reader - by nilamo - Jul-30-2018, 03:46 PM
RE: Reset csv.reader - by Huck - Jul-30-2018, 03:46 PM
RE: Reset csv.reader - by buran - Jul-30-2018, 04:20 PM
RE: Reset csv.reader - by Huck - Jul-30-2018, 04:42 PM
RE: Reset csv.reader - by buran - Jul-30-2018, 04:51 PM
RE: Reset csv.reader - by Huck - Jul-30-2018, 05:28 PM
RE: Reset csv.reader - by buran - Jul-30-2018, 05:34 PM
RE: Reset csv.reader - by Huck - Jul-30-2018, 05:53 PM
RE: Reset csv.reader - by buran - Jul-30-2018, 06:15 PM
RE: Reset csv.reader - by Huck - Jul-30-2018, 09:02 PM
RE: Reset csv.reader - by buran - Jul-31-2018, 09:19 AM
RE: Reset csv.reader - by Huck - Jul-31-2018, 04:23 PM
RE: Reset csv.reader - by DeaD_EyE - Jul-31-2018, 05:50 PM
RE: Reset csv.reader - by buran - Jul-31-2018, 05:54 PM
RE: Reset csv.reader - by DeaD_EyE - Jul-31-2018, 06:27 PM
RE: Reset csv.reader - by Huck - Aug-01-2018, 04:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to optimize analog gauge reader? kadink 0 879 May-19-2023, 08:58 PM
Last Post: kadink
  vtk reader paul18fr 1 1,674 Feb-07-2022, 10:21 PM
Last Post: Larz60+
  Frequency Reader? mekha 8 5,552 Jul-11-2018, 04:04 AM
Last Post: mekha

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020