Nice one. Thanks for you reply. Clever solution
Why does this work with no function/return statement? Could I do this with other katas or is there something about this kata that means a function/return statement isn't necessary? Thanks
I did not know swapcase existed. now I know
Well... a man learns all his life.
Oh man, that's way simpler than what I did.
Glad that I now know this shortcut!
Thank you :)
Super clean and readable! Love it!
I believe this fails for index == len(items), the conditional is true so it'll try to look it up but the index is out of bounds.
Seeing this after I solved mine in a single line via lambda made me cry haha
If my feedback offended you, I apologize. That was certainly not my intent. All kata are subject to "best practice" evaluation, regardless of kyu level, and "best practice" refers to practices that are appropriate in production code. In any case, my intent was simply to inspire a dialogue with someone worthy of my respect (namely, you) who might have a compelling counter argument.
This kata is clearly an entry level programming kata and not a "write production code" kata, so you're completely missing the point.