My code is not correct but it did pass all the tests.
The simplest test case to add: 'ab_ba'. The idea is that all carecters that are not used in the palindrome are special characters.
The description of the cata assumes that you read a describtion of the second one.
Can you please add this part here too:
"When transmitting the Morse code, the international standard specifies that:
"Dot" – is 1 time unit long.
"Dash" – is 3 time units long.
Pause between dots and dashes in a character – is 1 time unit long.
Pause between characters inside a word – is 3 time units long.
Pause between words – is 7 time units long."
Absolutely.
args[0:2] = ...
changes contents of args;args = ...
reassigns local variable.You mean I am dealing with args as a local variable and reassigned it with a new value instead of changing its actual content right?
Because you don't change args in place, you reassign it with the new value.
why it doesn't work when I just say:
args = args[::-1]
This would have been nice to know going in. I wound up with these numbers hard-coded based on test cases and had no idea why.
My code is not correct but it did pass all the tests.
The simplest test case to add: 'ab_ba'. The idea is that all carecters that are not used in the palindrome are special characters.
The description of the cata assumes that you read a describtion of the second one.
Can you please add this part here too:
"When transmitting the Morse code, the international standard specifies that:
"Dot" – is 1 time unit long.
"Dash" – is 3 time units long.
Pause between dots and dashes in a character – is 1 time unit long.
Pause between characters inside a word – is 3 time units long.
Pause between words – is 7 time units long."