Sqlite format string

ivanko.rus at gmail.com ivanko.rus at gmail.com
Sat Aug 29 17:44:10 EDT 2009


29.08.2009 15:40 пользователь "Sergio Charpinel Jr."  
<sergiocharpinel at gmail.com> написал:
> Thanks.
> Do you know if both of them works for mysql too?

> 2009/8/29 ivanko.rus at gmail.com>

> 29.08.2009 15:27 пользователь "Sergio Charpinel Jr."  
> sergiocharpinel at gmail.com> написал:

Actually, this works for any string (it doesn't depend on anything else).  
So you can pass "somestring {0}".format(foo) to any function because the  
string will be formatted _first_ and then passed as an argument. The same  
goes with "somestring %s" % "foo". Both will work
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090829/f8e35622/attachment-0001.html>


More information about the Python-list mailing list