The percent sign is a placeholder. For example, if level = 1 msg = 'look'
Then '[[Log level %d: %s]]' % ( level, msg ) becomes '[[Log level 1: look]]' %d means insert an integer %s means insert a string You can also use dictionaries. d = {'string1': 'hey', 'string2': 'you'} Then '%(string1)s %(string2)s' % d becomes 'hey you' On Thu, Jul 17, 2008 at 10:33 AM, korean_dave <[EMAIL PROTECTED]> wrote: > What does this operator do? Specifically in this context > > test.log( "[[Log level %d: %s]]" % ( level, msg ), description ) > > (Tried googling and searching, but the "%" gets interpreted as an > operation and distorts the search results) > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list