[Tutor] How to split something?

Steven D'Aprano steve at pearwood.info
Sun Jan 29 05:15:54 CET 2012


Alan Ting wrote:
> Hello,
> How do I get the characters to separate?

It isn't clear what you mean. Do you mean this?

"JOON" => "J O O N"


If so:

' '.join('JOON')

will do it.


-- 
Steven


More information about the Tutor mailing list