what is the pythonic efficient way to insert a character every n-characters in a string? for example
ins("aabbccdd", 2, "-") => "aa-bb-cc-dd"
is there a way to do this with iterators?
what is the pythonic efficient way to insert a character every n-characters in a string? for example
ins("aabbccdd", 2, "-") => "aa-bb-cc-dd"
is there a way to do this with iterators?