Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #79859

Re: % symbol in python

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: % symbol in python
Date 2014-10-28 22:17 +0000
References <b80ee29c-e23a-4f11-9c65-746f7d74c347@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.15272.1414534647.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 28/10/2014 21:41, satishmlmlml@gmail.com wrote:
> <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 refer to 
https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

% symbol in python satishmlmlml@gmail.com - 2014-10-28 14:41 -0700
  Re: % symbol in python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-10-28 22:17 +0000
  Re:% symbol in python Dave Angel <davea@davea.name> - 2014-10-28 21:57 -0400
    Re: % symbol in python satishmlmlml@gmail.com - 2014-10-28 20:51 -0700
      Re: % symbol in python Chris Angelico <rosuav@gmail.com> - 2014-10-29 15:02 +1100
        Re: % symbol in python satishmlmlml@gmail.com - 2014-10-28 21:41 -0700
          Re: % symbol in python alex23 <wuwei23@gmail.com> - 2014-10-29 15:25 +1000
            Re: % symbol in python satishmlmlml@gmail.com - 2014-10-28 22:48 -0700
              Re: % symbol in python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-10-29 08:40 +0000

csiph-web