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.
duplicate issue above
result += "0" still creates a new string.
Strings in Python are immutable. You can't change them.
If you change the, you will always create a new string - doesn't matter what operator you use.
Use lists if you want to avoid recreating strings for each iteration.
See my solution if needed.
No. According to the problem statement there needs to be at least one zero between each encoded dot and dash in the bit string. So '1110001110000000111' should be decoded as '...' because the number of bit samples for a dot seems to 3 so this bit string should be decoded as 'S'.
Done.