Delete every third character. Given a string, remove all characters from it whose indices are divisible by 3.
Test Case | Input (String) | Expected Output |
---|---|---|
1 | abcdefghij | bdefhij |
2 | 0123456789 | 1245789 |
3 | hello world | el olrd |
Python, Java
Delete every third character. Given a string, remove all characters from it whose indices are divisible by 3.
Test Case | Input (String) | Expected Output |
---|---|---|
1 | abcdefghij | bdefhij |
2 | 0123456789 | 1245789 |
3 | hello world | el olrd |