I'll admit that I often spend more time than I should refactoring after I have a solution. I do feel like there seems to be a bit too much focus on "golf" coding often to the detriment of readability. It is easy to get caught up in the game though. I wouldn't worry too much if you're able to follow those shorter solutions, it will just start to trickle into your own solutions.
This is not a kata suggestion, ie. a suggestion of improvement to the kata. Also, don't give free hints in Discourse, users are supposed to solve the katas by themselves, not by looking at Discourse page. Trying, failing and searching is always instructive, just like it has been for you.
If Counter does what you want, why not use it? Anyway your question is unclear and not related to the kata. If you want to discuss a particular Python feature, you'd better go on Codewar's Discord Python channel (see left panel).
I'll admit that I often spend more time than I should refactoring after I have a solution. I do feel like there seems to be a bit too much focus on "golf" coding often to the detriment of readability. It is easy to get caught up in the game though. I wouldn't worry too much if you're able to follow those shorter solutions, it will just start to trickle into your own solutions.
solutions with itertools can pass tests, to my knowledge
make sure you do not have any unecessary calculations
it means your solution is not efficient enough
yes, an engineer may help :P
i really wonder how are we supposed to shorten our codes like that.
This is not a kata suggestion, ie. a suggestion of improvement to the kata. Also, don't give free hints in Discourse, users are supposed to solve the katas by themselves, not by looking at Discourse page. Trying, failing and searching is always instructive, just like it has been for you.
If Counter does what you want, why not use it? Anyway your question is unclear and not related to the kata. If you want to discuss a particular Python feature, you'd better go on Codewar's Discord Python channel (see left panel).
This isn't a kata issue, it's a problem with your code. In your pc, the input is a number, here it is an array of numbers. Please read this: https://docs.codewars.com/training/troubleshooting