[Tutor] joining selected items in list

Alan Gauld alan.gauld at btinternet.com
Sun Jun 24 21:35:16 CEST 2012

On 24/06/12 17:11, David wrote:
> Dear Tutors,
> I have a list that I wish to reorganise into fewer list items.
> What happens is that some of the items belong together:
> not ['keine', 'Antwort'] but ['Keine Antwort'].
> I am not aware of any list methods that can help me here, and would thus
> be grateful for a hint or two.

Can you define the set of rules whereby items are grouped?
If not you are right there is nothing that can help you.
But if you can then we should be able to suggest something.
But for now your exact requirement seems more than a little arbitrary.

Alan G
Author of the Learn to Program web site

More information about the Tutor mailing list