A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/1999-November/014501.html below:

Printing strings

Printing strings Printing stringsMatthew Hirsch meh9 at cornell.edu
Tue Nov 2 10:18:59 EST 1999
Hi All,

I'm trying to do something like the following:

a=4.0
b=2.0
print '2(%3.1f)' % a,b

where I really mean

print '%3.1f %3.1f' % a,b

but it's printing

2(4.0) 2.0

Is there a way of doing this so I don't have to write out %3.1f,
multiple times?

Thanks,
Matt




More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4