String interpolation question

Ian Bicking ianb at colorstudy.com
Mon Apr 15 16:46:10 EDT 2002


On Mon, 2002-04-15 at 15:19, Fernando Pérez wrote:
> but I don't want that because in my real problem, the string is long and I 
> don't want the dangers of positionally matched %s arguments.

Then do 
  print somestring.replace("%", "%%") % y[i]

  Ian







More information about the Python-list mailing list