Stuck on a Python loop for 3 days, finally got it working this morning | Coding For Beginners - Freelance Forum - The Community for Independent Professionals
Stuck on a Python loop for 3 days, finally got it working this morning
I was building a tiny script to sort my shift schedule and keep looping back to the same error where it only read the first line of my text file. Tried splitting the data differently after watching like 4 YouTube videos, but still hit a wall where the output skipped every other entry. Then last night I noticed I had an extra indentation inside the for loop that was messing up the counter, one space basically. Removed it and ran the file at 2 AM, it printed all 14 shifts correctly. Felt like such a simple fix but it totally broke my brain for 72 hours. Anyone else spent way too long on a single space or semicolon before figuring it out?