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.
Check out mine solution, i've fixed this cheating with the edge cases.
Top solutions require python 2.x.
I've had the same issue.
Check out my solution, it's almost the same, but works fine for all the edge cases.
For example: what if there is 3.25 in tests? My solution is the same, but I think it is pretty cheating and should not be allowed. Hovewer top solutions for this kata does not work now also.
Your code like mine, i don't find something smarter than just compare with 4.25. If you know best solution tell me why you solve it.
We almost had the exact same solution but you simplified away one 5, nice!
There're no tests which reuse the returned function, so
get_permutation
should receive both the pattern and the non-permuted list, and return a permuted list.Done, thanks for pointing this out!
You're absolutely right, thanks for spotting this. I think I've fixed the issue.
Clever how you beat the static tests as well as the random ones!
Hi,
plz, update your test suite so that it uses the new test framework (mostly: it's missing
describe
andit
blocks):https://github.com/Codewars/codewars.com/wiki/Codewars-Python-Test-Framework-V2
This shouldn't work.
What do you mean?
The user can modify the input.
I had the same issue and it was because my index had exceeded the bounds of the string str, so blank characters were being added to my result. Maybe have another look at your loop conditions? Try printing the string one char at a time to see where the blanks are being added
This is really helpful to know, and something I hadn't thought about. Thanks
My mistake! Sorry about that. Thanks for letting me know
Loading more items...