Efficient way to add spaces between characters in a string

前端 未结 3 756
南笙
南笙 2020-12-03 09:56

Say I have a string s = \'BINGO\'; I want to iterate over the string to produce \'B I N G O\'.

This is what I did:

result =         


        
3条回答
提交回复
热议问题