That whitespace is killing me though...
Yet another built-in I learned today!
Came here to say this
Came here to say the same.
Clever, but certainly not best practice. This code is unreadable and unadaptable.
It's essentially just creating a tuple and looping through it.
This Kata is one of the worst. And the auther is clearly a rude individual who likes to fancy themself better than others. Don't pay them any mind.
Very annoying Kata. Read the instructions VERY carefully. Note that some rules are language specific.
That doesn't work since two '(' would cancell out one '}'... instead consider using a dictionary of counts for each. e.g.
if char in '({[': d[char] += 1
if char in '})]': d[char] -= 1
It's 3 times faster than yours and WAY cleaner.
Loading collection data...
That whitespace is killing me though...
Yet another built-in I learned today!
Came here to say this
Came here to say the same.
Clever, but certainly not best practice. This code is unreadable and unadaptable.
It's essentially just creating a tuple and looping through it.
This Kata is one of the worst. And the auther is clearly a rude individual who likes to fancy themself better than others. Don't pay them any mind.
Very annoying Kata. Read the instructions VERY carefully. Note that some rules are language specific.
That doesn't work since two '(' would cancell out one '}'... instead consider using a dictionary of counts for each. e.g.
if char in '({[': d[char] += 1
if char in '})]': d[char] -= 1
It's 3 times faster than yours and WAY cleaner.