Re: [Tutor] Better way to insert items into a list

2012-12-09 Thread eryksun
On Sun, Dec 9, 2012 at 4:48 AM, Peter Otten <__pete...@web.de> wrote: > def interleave(items, separator): > ... for item in items: > ... yield item > ... yield separator > ... +1 for this solution if a generator function is desired. It only requires basic Python sy

Re: [Tutor] Better way to insert items into a list

2012-12-09 Thread Peter Otten
Mike wrote: > Hello everyone, > > I was wondering if someone could show me a better way to achieve what > I am trying to do. Here is my test code: > > d=[] > c="00" > a="A,B,C,D" > b=a.split(',') > for item in b: > d.append(item) > d.append(c) > print tup

Re: [Tutor] how to play an mp3 file

2012-12-09 Thread Steven D'Aprano
On 09/12/12 19:49, Kirk Bailey wrote: How to play a .mp3 audio file in python is the quest of the moment; any prior art, off the shelf solutions? DuckDuckGo is your friend. https://duckduckgo.com/?q=python+%22play+mp3%22 https://duckduckgo.com/?q=python+play+mp3 -- Steven _

[Tutor] how to play an mp3 file

2012-12-09 Thread Kirk Bailey
How to play a .mp3 audio file in python is the quest of the moment; any prior art, off the shelf solutions? -- -Shaboom. Kirk Bailey CEO, Freehold Marketing LLC http://www.OneBuckHosting.com/ Fnord! ___ Tutor maillist - Tutor@python.or