Here's the simplest way to explain this. Here's what I'm using:
re.split('W', 'foo/bar spam
eggs')
-> ['foo', 'bar', 'spam', 'eggs']
Here's what I want:
someMethod('W', 'foo/bar spam
eggs')
-> ['foo', '/', 'bar', ' ', 'spam', '
', 'eggs']
The reason is that I want to split a string into tokens, manipulate it, then put it back together again.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…