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.
Yep you are correct. I remember seeing it used in the solutions and thought to myself DOH.
Looks like you forgot about 'abc'.isalpha()
I figured it out. I was iterating through a list and making modifications to that list which were producing incorrect list.index numbers. That was a beat down but hopefully I learned my lesson.
No it's difinately returning strings and integers with the string numbers before the ints. Oh I was misunderstanding the test. I thought the first array was the test and the second was the answer. Let me revisit my code. Thanks for the help.
terribleprogammer is right : original array for this test is
[3,"3","2",2,"2","1",1,"a","b","c"]
which contains string and integers ( and expects integers will be sorted before digits )I think your function only returns strings. if the orginal array contains integers then the output needs to have integers. i could be wrong but i hope that helps.
So I have to say that this kata has been pretty challenging for me which I really have enjoyed. I got stuck and I had to completely rethink my logic which pissed me off and made my function better. With all that said I can't figure out why I'm failing the following test.
Can someone explain why list of strings should return a list that now contains integers?
['a', 'b', 'c', '1', '1', '2', '2', '2', '3', '3'] should equal ['a', 'b', 'c', 1, '1', 2, '2', '2', 3, '3']
This is what my function returns which I feel is correct based on the instructions.
['a', 'b', 'c', '1', '1', '2', '2', '2', '3', '3']
Please help.
Thanks.
All my tests pass except this one. I don't understand why False is in the answer. The instructions don't say anything about boolean values. Am I missing something?
Testing for 6, 8, 8, 0, e, False, j
It should work for random inputs too: [6, 8, '0', 'e', 'j'] should equal [False, 6, 8, '0', 'e', 'j']