[EMAIL PROTECTED] a écrit :
> Thanks guys, I really appreciate it. I have never used google groups
> before
Actually, comp.lang.python is a usenet newsgroup, not a google group.
Google only gives you a web fronted (and archives...) for that group. I
personnaly access it with my MUA.
> and am so
> On Behalf Of [EMAIL PROTECTED]
> bo, daf, da
> pres, ppar, xppc
> magnjklep, *, dsa
> *, *, nbi
>
> But I want it justified, i.e:
>
> bo , daf, da
> pres , ppar, xppc
> magnjklep,*, dsa
> *,*, nbi
Once you have a nice rectangular list of lists, you might want to
On 9/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Thanks guys, I really appreciate it. I have never used google groups
> before and am so impressed with how helpful you all are. It is also lovely
> that none of you mock my little knowledge of Python but just want to
> improve it.
And we ar
Thanks guys, I really appreciate it. I have never used google groups
before
and am so impressed with how helpful you all are. It is also lovely
that
none of you mock my little knowledge of Python but just want to
improve it.
I have another question in relation to the izip_longest function (I
persu
[EMAIL PROTECTED] a écrit :
> On Sep 4, 3:20 pm, Bruno Desthuilliers [EMAIL PROTECTED]> wrote:
>
>>[EMAIL PROTECTED] a écrit :
>>(snip)
>>
>>
>>>Thanks guys
>>
>>>I have a list of lists such as
>>> a = ["1" , "2"] b = ["4", "5", "6"] c = ["7",8", "9"]
>>>Stored in another list: d = [a,b,c]
>>
>
On 9/4/07, Hrvoje Niksic wrote:
> Python isn't too happy about adding individual keyword arguments after
> an explicit argument tuple. Try this instead:
>
> for row in izip_longest(*d, **dict(fillvalue='*')):
> print ', '.join(row)
Or simply:
for row in izip_longest(fillvalue='*', *d):
[EMAIL PROTECTED] writes:
>> for row in izip_longest(*d, fillvalue='*'):
>> print ', '.join(row)
>>
>> HTH
>
> I thought that but when I tried it I recieved a
> "Syntax Error: Invalid Syntax"
> with a ^ pointing to fillvalue :S
Python isn't too happy about adding individual keyword arguments
[EMAIL PROTECTED] wrote:
> I know this makes me sound very stupid but how would I specify
> in the parameter the inner lists without having to write them all out
> such as:
>
> for row in izip_longest(d[0], d[1], d[2], fillvalue='*'):
> print ', '.join(row)
>
> i.e. How could I do the follow
On Sep 4, 3:20 pm, Bruno Desthuilliers wrote:
> [EMAIL PROTECTED] a écrit :
> (snip)
>
> > Thanks guys
>
> > I have a list of lists such as
> > a = ["1" , "2"] b = ["4", "5", "6"] c = ["7",8", "9"]
> > Stored in another list: d = [a,b,c]
>
> > I know this makes me sound very stupid but how woul
On Sep 4, 3:20 pm, Bruno Desthuilliers wrote:
> [EMAIL PROTECTED] a écrit :
> (snip)
>
> > Thanks guys
>
> > I have a list of lists such as
> > a = ["1" , "2"] b = ["4", "5", "6"] c = ["7",8", "9"]
> > Stored in another list: d = [a,b,c]
>
> > I know this makes me sound very stupid but how woul
[EMAIL PROTECTED] a écrit :
(snip)
> Thanks guys
>
> I have a list of lists such as
> a = ["1" , "2"] b = ["4", "5", "6"] c = ["7",8", "9"]
> Stored in another list: d = [a,b,c]
>
> I know this makes me sound very stupid but how would I specify
> in the parameter the inner lists without havin
On Sep 4, 2:06 pm, Duncan Booth <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> >> But watch out if the lists aren't all the same length: zip won't pad out
> >> any sequences, so it maynotbe exactly what is wanted here:
>
> >> >>> x = ['1', '2', '3']
> >> >>> y = ['4', '5']
> >> >>> for row
[EMAIL PROTECTED] wrote:
>> But watch out if the lists aren't all the same length: zip won't pad out
>> any sequences, so it maynotbe exactly what is wanted here:
>>
>> >>> x = ['1', '2', '3']
>> >>> y = ['4', '5']
>> >>> for row in zip(x,y):
>>
>> print ', '.join(row)
>>
>> 1, 4
>> 2, 5
>
> But watch out if the lists aren't all the same length: zip won't pad out
> any sequences, so it maynotbe exactly what is wanted here:
>
> >>> x = ['1', '2', '3']
> >>> y = ['4', '5']
> >>> for row in zip(x,y):
>
> print ', '.join(row)
>
> 1, 4
> 2, 5
>
Unfortunately the lists will be of
"A.T.Hofkamp" <[EMAIL PROTECTED]> wrote:
>> Each loop I perform, I get a new list of Strings.
>> I then want to print these lists as columns adjacent to each other
>> starting with the first
>> created list in the first column and last created list in the final
>> column.
>
> Use zip:
>
x =
15 matches
Mail list logo