Metalone wrote: <on imitatting VB's irritating space-or-minus> > > This might be a little too tricky. > [" %d", "%d][n < 0] % n --> selects list[0] or list[1] based upon sign > of number >
("%+d" % 123).replace("+", " ") is slightly longer but instantly comprehensible, although I for one think your boolean indexing trick is cool. --Max -- http://mail.python.org/mailman/listinfo/python-list