Multisplit: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 1: | Line 1: | ||
{{draft task}}Code to split string with several separators. |
{{draft task}}Code to split string with several separators.<br> |
||
Input: string, list of separators |
Input: string, list of separators<br> |
||
Output: [ |
Output: [Sub0, [Sep0Num, Sep0Pos], Sub1, [Sep1Num, Sep1Pos], ..., SubN]<br> |
||
Note: Sub - substring, SepNum - separator number in input list, SepPos - separator position in input string. |
Note: Sub - substring, SepNum - separator number in input list, SepPos - separator position in input string.<br> |
||
Input order of separators is important: they are considered in that order. |
|||
=={{header|Python}}== |
=={{header|Python}}== |