[Tutor] Formatting a string

col speed ajarncolin at gmail.com
Tue Feb 1 13:35:32 CET 2011


You're missing a "." that if your computer is the same as mine, looks like
something left behind by a mosquito

On 1 February 2011 18:33, Karim <karim.liateni at free.fr> wrote:

>
> Hello,
>
> >>> "He is {what}".format(what="{wild}")
> 'He is {wild}'
>
> Regards
> Karim
>
>
> On 02/01/2011 09:44 AM, Becky Mcquilling wrote:
>
> Quick question to the group to solve an immediate problem and then if
> anyone has a dead simple reference on formatting strings it would be greatly
> appreciated as I'm finding this to be pretty confusing.
>
> Basically, I need to format a string as an example:
>
>  "
>
>  I want to insert wild in place of what and output the resulting text WITH
> the curly braces.  This is not the actual code but is the idea of what I
> need to do.
>
>  Thanks all,
>
>  Becky
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:http://mail.python.org/mailman/listinfo/tutor
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>


--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110201/ac89cc9b/attachment.html>


More information about the Tutor mailing list