[Tutor] what does %s do?
Thu, 25 Jan 2001 22:26:13 -0800
I 've been going through some code sent here from arcege (thanks arcege) -
it works great, but I wonder what %s does??
>>> a = [ 'one', 'two', 'three' ]
['__builtins__', '__doc__', '__name__', 'a']
>>> for b in a:
... exec '%sbuffer = ' % b #here it is
['__builtins__', '__doc__', '__name__', 'a', 'b', 'onebuffer',
as usual, thanks for the help