Am 29.10.14 07:15, schrieb satishmlm...@gmail.com:
What does %%(%s)s mean in Python?

Instead of posting all those questions here, you can simply try it in an interactive python interpreter:

Apfelkiste:VecTcl chris$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> test='%%(%s)s'
>>> test % 'foo'
'%(foo)s'
>>>

also
what does
rowshtml += (rowhtml % ((fieldname,) * 3)) expand to?

>>> fieldname='foo'
>>> (fieldname,)*3
('foo', 'foo', 'foo')
>>> test='first %s second %s third %s'
>>> test % ((fieldname,)*3)
'first foo second foo third foo'
>>>

        Christian
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to