% symbol in python

Dave Angel davea at davea.name
Wed Oct 29 02:57:23 CET 2014


satishmlmlml at gmail.com Wrote in message:
> <tr><th>key<td><input type=text name=key value="%(key)s">
> rowhtml = '<tr><th>%s<td><input type=text name=%s value"%%(%s)s">\n"
> 
> what does % mean in first line of code and
> what does %%(%s)s mean in second line of code
> 
> kindly explain
> 

Please post Python code, and we can try to comment on it. Those
 extra <tr> and <th> thingies are really killing my mental syntax
 checker.

Also, always specify the python version. 
-- 
DaveA




More information about the Python-list mailing list