Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Fork updating initial solution
@vrx- if you encounter other python kata which wrongly refer to arrays in the initial solution, feel free to solve and then fork and update the python translation (as I have done here). Once you've published the fork, you can post it in the kata discourse for someone to review.
Yeah, arrays in Python have been around for ages. The issue of python authors mislabelling lists as arrays has probably been around just as long. For newer kata, this should come up during the beta process/translation review, but it exists in a lot of older ones.
As for descriptions, array should just be read as a general "sequence" data type, since making descriptions very language specific is quite a hassel.
However in my opinion, the initial solution in Python should definitely refer to elements as lists, not arrays. Reading "array" in the description, but then seeing the argument named "lst" in the initial solution reassures that the input is indeed a list. However seeing the argument named "array" is more confusing, and also misleading to newer users.
Sorry for your head, but really I don't think it's going to happen on the hundreds, maybe thousands of katas refering to arrays. I've never seen a kata expecting an array, I didn't even know it existed, and I've never seen anyone complaining about that.
I've just learnt Python has arrays since 3.10 (so very recently). Well, I don't know what to tell, I have never seen yet a kata expecting arrays outputs... Probably we should rely on a framework update that would handle this properly. Until now, you would better return lists...
Still, vrx was refering to numpy.arrays.
In Python, an array (generic programming term) is implicitly a
list
(probably the most common data structure), not anumpy.array
, which is a very specific data structure.There are no data structures named arrays in Python, the descriptions are generic and don't give all the possible details for the tens of available languages.