+ 2
Why so many challenges feature modifying an array while iterating?
I've been under the impression that Sololearn is an app with educational purposes. If so, we should promote safe and healthy development practices. Modifying the list/array while iterating through it is neither safe nor healthy. So why exactly challenge questions (I'm talking about Python in particular) featuring this outright pernicious practice are approved?
5 odpowiedzi
+ 4
Seeing those type of questions made me ask myself: "How /Why does this work?". That's how I found out it wasn't good practice to do so.
+ 6
Those questions in challenges are just trying to confuse you, well not all of them, but you will find some for sure
+ 4
They're probably just there as a test of aptitude rather than to promote best practice.
+ 3
Anna What's the point of coding if your functions don't get overwritten and your program doesn't work as expected?
+ 2
They promote using "list" as a name for a list, too 😤