On 10/18/19 5:00 PM, D'Arcy Cain wrote:
Finally, if this is in a loop do this.
FMT = '{0[0]:<12s}{0[3]:>12s}'.format
for temp_list in GetLists(): print FMT(temp_list)
Oops. Time warp. I meant "print(FMT(temp_list))
--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...
On 10/18/19 2:21 PM, Jagga Soorma wrote:
I seem to have found a way to do this with the following:
print('{:<12s}{:>12s}'.format((temp_list[0]),(temp_list[3])))
Still let me know if there is a better way to format this output :)
I would start with removing the redundant parens.
print('{:<1
I seem to have found a way to do this with the following:
print('{:<12s}{:>12s}'.format((temp_list[0]),(temp_list[3])))
Still let me know if there is a better way to format this output :)
Thanks,
-J
On Fri, Oct 18, 2019 at 10:03 AM Jagga Soorma wrote:
>
> Hello,
>
> I am new to python and try
On 2019-10-18 18:03, Jagga Soorma wrote:
Hello,
I am new to python and trying to write a script that outputs some data
about users. I was able to write it and dump the data but can't seem
to align the output in column 2 correctly. Here is what I am trying
to do:
--
output:
user1 data1
use
vsoler wrote:
> My script contains a print statement:
>
> print '%40s %15d' % (k, m)
>
> However,
>
> 1- the string is right adjusted, and I would like it left
> adjusted
> 2- the number is a decimal number, and I would like it with
> the thousands separator and 2
vsoler wrote:
> Hello,
>
> My script contains a print statement:
>
> print '%40s %15d' % (k, m)
>
> However,
>
> 1- the string is right adjusted, and I would like it left
> adjusted
> 2- the number is a decimal number, and I would like it with
> the thousands sepa