Chris Angelico rosuav at gmail.com writes:
On Wed, Mar 27, 2013 at 4:06 AM, Wolfgang Maier
wolfgang.maier at biologie.uni-freiburg.de wrote:
Chris Angelico rosuav at gmail.com writes:
Try printing out this expression:
%.2f%value if value else ''
Without the rest of your code I
What's a neat way to print columns of numbers with blanks where a number
is zero or None?
E.g. I want to output something like:-
Credit Debit Description
100.00 Initial balance
123.45 Payment for cabbages
202.00 Telephone bill
For
On Wed, Mar 27, 2013 at 2:50 AM, c...@isbd.net wrote:
What's a neat way to print columns of numbers with blanks where a number
is zero or None?
E.g. I want to output something like:-
Credit Debit Description
100.00 Initial balance
123.45
In jms82a-6sl@chris.zbmc.eu c...@isbd.net writes:
What's a neat way to print columns of numbers with blanks where a number
is zero or None?
print number or ' '
--
John Gordon A is for Amy, who fell down the stairs
gor...@panix.com B is for Basil,
Chris Angelico rosuav at gmail.com writes:
Try printing out this expression:
%.2f%value if value else ''
Without the rest of your code I can't tell you how to plug that in,
but a ternary expression is a good fit here.
ChrisA
Unfortunately, that's not working, but gives a TypeError:
On Wed, Mar 27, 2013 at 4:06 AM, Wolfgang Maier
wolfgang.ma...@biologie.uni-freiburg.de wrote:
Chris Angelico rosuav at gmail.com writes:
Try printing out this expression:
%.2f%value if value else ''
Without the rest of your code I can't tell you how to plug that in,
but a ternary
Wolfgang Maier wrote:
Chris Angelico rosuav at gmail.com writes:
Try printing out this expression:
%.2f%value if value else ''
Without the rest of your code I can't tell you how to plug that in,
but a ternary expression is a good fit here.
ChrisA
Unfortunately, that's not
On 03/26/2013 10:06 AM, Wolfgang Maier wrote:
Chris Angelico rosuav at gmail.com writes:
Try printing out this expression:
%.2f%value if value else ''
Without the rest of your code I can't tell you how to plug that in,
but a ternary expression is a good fit here.
ChrisA
Unfortunately,
On Wed, Mar 27, 2013 at 4:21 AM, Ethan Furman et...@stoneleaf.us wrote:
On 03/26/2013 10:06 AM, Wolfgang Maier wrote:
Chris Angelico rosuav at gmail.com writes:
Try printing out this expression:
%.2f%value if value else ''
Without the rest of your code I can't tell you how to plug that