Adrien <adnothing at gmail.com> writes: > print "{:.3g}".format(2.356) # this rounds up But: >>> print "{:.3g}".format(12.356) 12.4 >>> print "{:.3g}".format(123.356) 123 -- Piet van Oostrum <piet at vanoostrum.org> WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4]