Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
How to split string
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Johny, post: 3168053"] Chris, Thank you for your reply. So, let's suppose the example: S='this is just a random sequence of letters courtesy of monkeys on typewriter.' and the length of split strings is now 10( instead of 6) The example should be like this this is just a random sequence of letters courtesy of monkeys on typewriter In other words, the string should be split at every 10th possition but if the 10th character is space, then the string must be split at the nearest space before the 10th possition. It could be better explained if the length of split strings will be 20. S='this is just a random sequence of letters courtesy of monkeys on Results: this is just a random sequence of letters courtesy of monkeys on typewriter.' Any idea how to do that? Thank you L. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
How to split string
Top