| is set union -- see the documentation
Can you explain, please, what does "|" mean in this solution?
Oh, shit!, I had no idea for the second argument in the int function. The use of the map is perfect.
My solution is so extended compared to this.
imagine someone who isn't familiar with coding looking at this and thinking hey! this seems easy enough
print(same_structure_as([12, 3, 4, 2, 21, 3, 4, 5, 2, [12, 32, [2, 1, 2, 3, 4, [2, 1, 2, 3]]]],
[2, 2, 3, 1, 2, 3, 4, 5, [3, [[1, [2, [3, [4, [[5, [3, [2, ]]]]]]]]]]]))
that's how you entered in the insane mode
Little slowpoke, but I've just made this kata and saw your comment. Your solution does not work because your thickness equals 0.001 instead of 0.0001 (one 0 is missing).
I like to see everything in one line. But it's not good practice.
Indeed, match()...groups() is the proper tool for this job -- I just did it my usual lazy way... see the updated code in the fork
This comment is hidden because it contains spoiler information about the solution
This walks the whole list for something that might be done after the second element.
It's a perfectly good solution to the kata, but it's not a Best Practice.