Hi Denis,
On Fri, Nov 20, 2015 at 05:08:21PM -, Denis McMahon wrote:
> On Fri, 20 Nov 2015 16:53:47 +0100, Peter Otten wrote:
>
> > Ervin Hegedüs wrote:
>
> >> Python has a good string formatter, eg. I can do this:
>
> Or even:
>
> >>> s = "{who} likes {what}"
> >>> d = {'who': "Adam", '
Hi Peter,
On Fri, Nov 20, 2015 at 04:53:47PM +0100, Peter Otten wrote:
> Ervin Hegedüs wrote:
>
> > Python has a good string formatter, eg. I can do this:
> >
> > s = "{who} likes {what}"
> > d = {'who': "Adam", 'what': "ants"}
> > s.format(**d)
> >
> > result:
> > 'Adam likes ants'
> >
> > Is
On Fri, 20 Nov 2015 16:53:47 +0100, Peter Otten wrote:
> Ervin Hegedüs wrote:
>> Python has a good string formatter, eg. I can do this:
>> s = "{who} likes {what}"
>> d = {'who': "Adam", 'what': "ants"}
>> s.format(**d)
>> result:
>> 'Adam likes ants'
>> Is it possible, and if yes, how to reso
Ervin Hegedüs wrote:
> Python has a good string formatter, eg. I can do this:
>
> s = "{who} likes {what}"
> d = {'who': "Adam", 'what': "ants"}
> s.format(**d)
>
> result:
> 'Adam likes ants'
>
> Is it possible, and if yes, how to resolve the placeholders names
> in string?
>>> import string
Hello Chris,
On Sat, Nov 21, 2015 at 02:06:11AM +1100, Chris Angelico wrote:
> On Sat, Nov 21, 2015 at 1:52 AM, Ervin Hegedüs wrote:
> > Python has a good string formatter, eg. I can do this:
> >
> > s = "{who} likes {what}"
> > d = {'who': "Adam", 'what': "ants"}
> > s.format(**d)
...
> > But
On Sat, Nov 21, 2015 at 1:52 AM, Ervin Hegedüs wrote:
> Python has a good string formatter, eg. I can do this:
>
> s = "{who} likes {what}"
> d = {'who': "Adam", 'what': "ants"}
> s.format(**d)
>
> result:
> 'Adam likes ants'
>
> Is it possible, and if yes, how to resolve the placeholders names
>