Talk:Multisplit: Difference between revisions

From Rosetta Code
Content added Content deleted
m (Needs nowiki tags)
(→‎What is going on here?: Clarification request.)
Line 4: Line 4:
<nowiki>['a', [1, 1], '', [0, 3], 'b', [2, 6], '', [1, 7], 'c']</nowiki>
<nowiki>['a', [1, 1], '', [0, 3], 'b', [2, 6], '', [1, 7], 'c']</nowiki>
What's with the empty strings there? Is it saying that there are empty strings at position 3 and 7 in the input string and that they correspond to separators 0 and 1? This doesn't make sense to me at all. --[[User:Mwn3d|Mwn3d]] 04:27, 27 February 2011 (UTC)
What's with the empty strings there? Is it saying that there are empty strings at position 3 and 7 in the input string and that they correspond to separators 0 and 1? This doesn't make sense to me at all. --[[User:Mwn3d|Mwn3d]] 04:27, 27 February 2011 (UTC)

The task description doesn't stand on its own at the moment. Do you mean to have arbitrary interpretation of what constitutes a match for example?<br>
I.e. given a text of 'X123Y' and separators '1', '12', '123', '23', and '3' then there are a multitude of possible answers which would fit the initial task description. This may lead to answers that are difficult to compare due to diverging interpretations of the spec.

The output format seems to be Python specific. Do you mean it to be or could any ordered output of ''<code>sub<N>, sepnum<N>, seppos<N>, ...</code>'' work? --[[User:Paddy3118|Paddy3118]] 04:46, 27 February 2011 (UTC)

Revision as of 04:46, 27 February 2011

What is going on here?

So I see that we have this for some sample output:

['a', [1, 1], '', [0, 3], 'b', [2, 6], '', [1, 7], 'c']

What's with the empty strings there? Is it saying that there are empty strings at position 3 and 7 in the input string and that they correspond to separators 0 and 1? This doesn't make sense to me at all. --Mwn3d 04:27, 27 February 2011 (UTC)

The task description doesn't stand on its own at the moment. Do you mean to have arbitrary interpretation of what constitutes a match for example?
I.e. given a text of 'X123Y' and separators '1', '12', '123', '23', and '3' then there are a multitude of possible answers which would fit the initial task description. This may lead to answers that are difficult to compare due to diverging interpretations of the spec.

The output format seems to be Python specific. Do you mean it to be or could any ordered output of sub<N>, sepnum<N>, seppos<N>, ... work? --Paddy3118 04:46, 27 February 2011 (UTC)