May-10-2022, 01:43 PM
(May-09-2022, 07:07 PM)Gribouillis Wrote:As a teacher, seeing this type of code makes me nuts as no student, even one who understand basic python, would have any idea what is going on.# Set a variable for accessing turtle objects while turtles[i].xcor() < 200: turtles[i := (i + 1) % len(turtles)].forward(randint(0, 5))
As a programmer, and former developer... I absolutely love it. The fact that you have have an assignment operator that returns a value is insane. Stuff like this is exactly why I describe python as being fun rather than easy.