On Thu, Mar 29, 2018 at 1:54 AM, Dan Stromberg wrote:
> On Wed, Mar 28, 2018 at 7:30 AM, Ganesh Pal wrote:
>>>
>>> Or maybe they're not giving the same result. I'm a little confused here.
>>>
>>
>>
>> My Bad and Apologies , I should be fined for pasting wrong question.
>>
>> Actually I wanted t
On Wed, Mar 28, 2018 at 7:30 AM, Ganesh Pal wrote:
>>
>> Or maybe they're not giving the same result. I'm a little confused here.
>>
>
>
> My Bad and Apologies , I should be fined for pasting wrong question.
>
> Actually I wanted to know if its ok to use just empty {} with .format()
> or use {
"Ganesh Pal" wrote in message
news:CACT3xuUmOzR=5G9=zaf3fp2lytbgjv74vsyjfsvsifo77lf...@mail.gmail.com...
Actually I wanted to know if its ok to use just empty {} with .format()
or use {} with values i.e {0} {1} both will give the same results anyway
The benefit of using empty {} is that yo
>
> Or maybe they're not giving the same result. I'm a little confused here.
>
My Bad and Apologies , I should be fined for pasting wrong question.
Actually I wanted to know if its ok to use just empty {} with .format()
or use {} with values i.e {0} {1} both will give the same results anyway
On 03/26/2018 09:37 AM, Ganesh Pal wrote:
> Hi Team,
>
> Just a quick suggestion, on string formatting with .format() which of the
> below is better , given both give the same result .
No they don't. Look more closely at the output.
attempts = 1
msg2 = "Hello"
print "Retry attempt
>
>
> Or maybe they're not giving the same result. I'm a little confused here.
>
>
Thanks Chris, for the reply they appear to give the same result .
--
https://mail.python.org/mailman/listinfo/python-list
在 2018年3月26日星期一 UTC+8下午11:37:46,Ganesh Pal写道:
> Hi Team,
>
> Just a quick suggestion, on string formatting with .format() which of the
> below is better , given both give the same result .
>
> >>> attempts = 1
> >>> msg2 = "Hello"
> >>> print "Retry attempt:{0} for error:{1}".format(attempts,msg2
On Tue, Mar 27, 2018 at 2:37 AM, Ganesh Pal wrote:
> Hi Team,
>
> Just a quick suggestion, on string formatting with .format() which of the
> below is better , given both give the same result .
>
attempts = 1
msg2 = "Hello"
print "Retry attempt:{0} for error:{1}".format(attempts,msg
Hi Team,
Just a quick suggestion, on string formatting with .format() which of the
below is better , given both give the same result .
>>> attempts = 1
>>> msg2 = "Hello"
>>> print "Retry attempt:{0} for error:{1}".format(attempts,msg2)
Retry attempt:1 for error:Hello
OR
>>> attempts = 1
>>> ms