[Tutor] joining selected items in list

David ldl08 at gmx.net
Sun Jun 24 18:11:10 CEST 2012


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.

Thank you!

David



Original list:


[['Intervall-', 'Anzahl', 'Rufzeit', 'Rufzeit', 'Rufzeit', 'Rufzeit',
'>', 'Mittlere', 'Anzahl', 'Unzul\xe4ssiger', '\xdcberlauf',
'Zielanschlu\xdf', 'keine', 'Antwort', 'nicht', 'aktiv',
'Ung\xfcltiger', 'REST', '(andere']]

What I want is this:

[['Intervall-',
'Anzahl',
'Rufzeit',
'Rufzeit',
'Rufzeit',
'Rufzeit >',
'Mittlere',
'Anzahl',
'Unzul\xe4ssiger',
'\xdcberlauf',
'Zielanschlu\xdf',
'keine Antwort',
'nicht aktiv',
'Ung\xfcltiger',
'REST' (andere']]


More information about the Tutor mailing list