Here's a weird thing that seems to work (especially while learning): Instead of copy-pasting code, type it into your program by hand. For some reason this helps a lot when trying to understand or debug the code that you are entering.
This works equally for those of us who started learning using BASIC on 8-bitters, all the way to Python, Java, or odd things like Siemens SCL.
Wrt editors: the times I've taught people, I actually went completely the other way: requiring the first few programs to be written in notepad or nano (depending on OS) . This tends to take the magic out of what the IDE is doing, and makes everything after it much easier.
Both of the above would seem to be relatively time-consuming. But oddly enough in practice they can save more time than they consume.
I also don’t give homework. If you want to learn on your own, you can, but homework is a massive crutch that I don’t think benefits most people.
Have you taught a similar crowd any other language and gotten a different experience?
Because what you describe sounds like the students in my introductory programming class, which was in C++. Sure, they didn't have whitespace issues, but did demonstrate a similar lack in rigor, and giving up easily.
The equivalent in an introductory C/C++ class:
"I put a newline, why do you care if I put a semicolon?"
At some point, students have to accept the quirks of any language's syntax. It's OK to have an opinion and hate it, but whitespace complaints are mostly a preference issue.
(Every time I switch from Python to a language requiring semicolons, it always feels like I'm hitting endless speed bumps.)
While Python may not be a beginner language, nor is Java/C/C++, in my opinion - and for people completely new to programming, those have a steeper learning curve than Python (the for loops are just hideous). These were the standard introductory languages in college before Python took over. I'm sure better teaching languages exist, and I'm also sure JS is not one of them ;-)
If your goal is understanding data structures, algorithms, etc, then C is hideous. Explaining function prototypes, include headers, very unfriendly I/O, and I already mentioned the horrible syntax for for loops.
There's a reason most of the data structures/algorithms were in a second course at my university: It's because it took most of one semester for students to get a handle on the very basics of C syntax.
Part of me wants to forbid all "dumb" text editors for introductory programming courses and make everyone use an AST-based one that only allows you to create syntactically correct programs. Unfortunately there's zero chance of that happening any time soon...