Re: [Tutor] Creating a list from other lists

2012-10-23 Thread eryksun
On Tue, Oct 23, 2012 at 4:51 AM, Walter Prins wrote: > > Looking at the email source it clearly shows as being mimetype > "multipart" with both a plaintext and HTML part. I don't think you > can much criticise GMail for interpreting and attempting to render an > HTML email as HTML. The biggest c

Re: [Tutor] Creating a list from other lists

2012-10-23 Thread Steven D'Aprano
On 23/10/12 19:51, Walter Prins wrote: It's an HTML post. Not according to the version of Thunderbird I am using, which shows it as a plain text email. I suspect that the HTML attachment may be invalid HTML, understandable by Gmail and possibly nothing else. Typical of Google :( Looking at t

Re: [Tutor] Creating a list from other lists

2012-10-23 Thread Walter Prins
>> It's an HTML post. > > Not according to the version of Thunderbird I am using, which shows it > as a plain text email. > > I suspect that the HTML attachment may be invalid HTML, understandable > by Gmail and possibly nothing else. Typical of Google :( Looking at the email source it clearly sho

Re: [Tutor] Creating a list from other lists

2012-10-22 Thread Steven D'Aprano
On 22/10/12 21:52, eryksun wrote: On Mon, Oct 22, 2012 at 6:37 AM, Steven D'Aprano wrote: On 22/10/12 21:21, Saad Javed wrote: for x, y , z in zip(a, b, c): L.extend([x, y, z]) print L This is not your code, because that gives a SyntaxError. Where is the indentation? Indentation is required

Re: [Tutor] Creating a list from other lists

2012-10-22 Thread Walter Prins
Hi Saad, On 22 October 2012 11:37, Steven D'Aprano wrote: > On 22/10/12 21:21, Saad Javed wrote: >> I'm trying to create a list (L) from items of different lists (a, b, c) >> but >> in a specific order (L = [[a1, b1, c1], [a2, b2, c2]...etc]) >> L = [] >> a = [1, 2, 3, 4] >> b = ['a', 'b', 'c', '

Re: [Tutor] Creating a list from other lists

2012-10-22 Thread eryksun
On Mon, Oct 22, 2012 at 6:37 AM, Steven D'Aprano wrote: > On 22/10/12 21:21, Saad Javed wrote: >> >> for x, y , z in zip(a, b, c): >> L.extend([x, y, z]) >> print L > > This is not your code, because that gives a SyntaxError. Where is > the indentation? Indentation is required in Python, if you le

Re: [Tutor] Creating a list from other lists

2012-10-22 Thread Steven D'Aprano
On 22/10/12 21:21, Saad Javed wrote: Hi, I'm trying to create a list (L) from items of different lists (a, b, c) but in a specific order (L = [[a1, b1, c1], [a2, b2, c2]...etc]) L = [] a = [1, 2, 3, 4] b = ['a', 'b', 'c', 'd'] c = [2009, 2010, 2011, 2012] for x, y , z in zip(a, b, c): L.extend(

Re: [Tutor] Creating a list from other lists

2012-10-22 Thread Walter Prins
Hi Saad, On 22 October 2012 11:21, Saad Javed wrote: > Hi, > > I'm trying to create a list (L) from items of different lists (a, b, c) but > in a specific order (L = [[a1, b1, c1], [a2, b2, c2]...etc]) > L = [] > a = [1, 2, 3, 4] > b = ['a', 'b', 'c', 'd'] > c = [2009, 2010, 2011, 2012] > > for x

[Tutor] Creating a list from other lists

2012-10-22 Thread Saad Javed
Hi, I'm trying to create a list (L) from items of different lists (a, b, c) but in a specific order (L = [[a1, b1, c1], [a2, b2, c2]...etc]) L = [] a = [1, 2, 3, 4] b = ['a', 'b', 'c', 'd'] c = [2009, 2010, 2011, 2012] for x, y , z in zip(a, b, c): L.extend([x, y, z]) print L But this outputs: [