Bob Williams <li...@barrowhillfarm.org.uk> Wrote in message: > to slice those lines to get the artist and album > names into a list. > > So far, so good but my output contains duplicates, so my final task is > to work out how to get rid of them. >
Hint: a set will contain only one of each item. So if you have a list of immutable items, the following will eliminate duplicates: newlist = list (set (oldlist)) Sometimes a dict is better, if only part of each item is to be made unique. This assumes that order doesn't matter. If it does, perhaps an ordered dict. -- DaveA _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor