From my experience, in the early programming classes that have switched from Java to Python, one of the reasons is the verbosity of Java. When you're trying to teach the basics of programming -- variables, some simple text IO, loops, functions, the structure imposed by Java can be a little overwhelming. I recall a lot of other students struggling with getting past all the little things you had to do just to get a "Hello World" written. Python is simpler to gradually introduce those concepts with, especially with very those who are just starting out. And especially when you're dealing with a quarter system, which many schools use, as a teacher you had a very limited amount of time to get through that sort of material.
Python is a great language for the non-professional programmer who wants to put their other skills on wheels. Even if other languages have more pedagogical value, Python is easy to learn and not a waste of time of time for anybody. (At work I code Java/Javascript but wrote a “maintainance droid” in Python that merges changes from git, installs database migrations, runs tests and all that so I don’t have to.)
You are right IMHO. Java 24 introduces a much shorter "hello world" experience with:
- no class déclaration
- no void, static, public statements
- no System.out