Feature request: New string conversion type to ignore list item
Peter Otten
__peter__ at web.de
Tue Jun 5 07:12:01 EDT 2007
thomas.pohl at gmail.com wrote:
> let's assume you want to nicely print the content of a list except for
> one (or some) individual item. You could do it like this:
> t = ["foo", "skip me", 1, 2, 3]
> print("text: %s\nvalues: %i %i %i" % (t[0], t[2], t[3], t[4]))
or like this:
>>> "%s %.s %s" % ("first", "second", "third")
'first third'
Peter
More information about the Python-list
mailing list