[boB Stepp , on %i/%d and %f/%F]
> Hmm. I'm surprised this slight distinction was worth keeping two
> format codes that otherwise do the same thing. Is there an actual
> need for these due to Python being implemented behind the scenes in C?
The implementation is irrelevant to this. What is rele
On Thu, 27 Apr 2017 01:58:39 +
eryk sun wrote:
> That exception indicates you probably used set(int(num)) instead of
> either {int(num)} or set([int(num)]).
Thank you Eryl, you are correct. Problem solved.
--
Regards,
Phil
___
Tutor maillist -
On Thu, Apr 27, 2017 at 2:19 AM, Tim Peters wrote:
> [boB Stepp ]
>
>> I cannot find any discernible
>> difference between '%f' % and '%F' %
>> . Is there any or do they duplicate
>> functionality? If the latter, why are there two ways of doing the
>> same thing?
>
> They differ only in the ca
On Wed, Apr 26, 2017 at 9:19 PM, Tim Peters wrote:
> [boB Stepp ]
>> My Google-fu must be weak tonight.
>
> Look here:
>
> https://en.wikipedia.org/wiki/Printf_format_string
Thanks. From the %d versus %i links I found, I should have pursued
the C history more diligently for the %f versus %F
[boB Stepp ]
> My Google-fu must be weak tonight.
Look here:
https://en.wikipedia.org/wiki/Printf_format_string
> I cannot find any discernible
> difference between '%f' % and '%F' %
> . Is there any or do they duplicate
> functionality? If the latter, why are there two ways of doing the
My Google-fu must be weak tonight. I cannot find any discernible
difference between '%f' % and '%F' %
. Is there any or do they duplicate
functionality? If the latter, why are there two ways of doing the
same thing?
I had a similar question for %d and %i, but googling suggests these
are inheri
On Wed, Apr 26, 2017 at 8:34 PM, Phil wrote:
> On Wed, 26 Apr 2017 18:56:40 -0600
> Mats Wichmann wrote:
>
>> On 04/26/2017 06:33 PM, Phil wrote:
>> > Another question I'm afraid.
>> >
>> > If I want to remove 1 from a set then this is the answer:
>> >
>> > set([1,2,3]) - set([1])
>> >
>> > I had
On Thu, Apr 27, 2017 at 1:34 AM, Phil wrote:
> I did try {int(num)} but that resulted in an error that said something along
> the lines of int not being iterable. I'll have another look at that idea.
That exception indicates you probably used set(int(num)) instead of
either {int(num)} or set([int
On Wed, 26 Apr 2017 18:56:40 -0600
Mats Wichmann wrote:
> On 04/26/2017 06:33 PM, Phil wrote:
> > Another question I'm afraid.
> >
> > If I want to remove 1 from a set then this is the answer:
> >
> > set([1,2,3]) - set([1])
> >
> > I had this method working perfectly until I made a change to
On Thu, Apr 27, 2017 at 12:33 AM, Phil wrote:
> Another question I'm afraid.
>
> If I want to remove 1 from a set then this is the answer:
>
> set([1,2,3]) - set([1])
You can also use set literals here, with the caveat that {} is
ambiguous, and Python chooses to make it an empty dict instead of a
On Wed, Apr 26, 2017 at 7:33 PM, Phil wrote:
> Another question I'm afraid.
>
> If I want to remove 1 from a set then this is the answer:
>
> set([1,2,3]) - set([1])
>
> I had this method working perfectly until I made a change to cure another bug.
>
> So, I have a set represented in the debugger
Another question I'm afraid.
If I want to remove 1 from a set then this is the answer:
set([1,2,3]) - set([1])
I had this method working perfectly until I made a change to cure another bug.
So, I have a set represented in the debugger as {1,2,3} and again I want to
remove the one. Only this ti
Thanks you Neeraj giving the solution of problem I was trying as but not
able to find right solution
Thanks to others also for giving a nice advice
On Wed, Apr 26, 2017 at 4:36 AM, Neeraj Sharma wrote:
> c = [(12, 45), (1234, 567), (12345, 0), (678, 123456)]
>
> max_length = 0
> for key,value
c = [(12, 45), (1234, 567), (12345, 0), (678, 123456)]
max_length = 0
for key,value in c:
list1 = []
list2 = []
for i in str(key):
list1.append(i)
for j in str(value):
list2.append(j)
if (len(list1)>len(list2)): max_length = len(list1)
else:
Hi,
Find the code below
c = [(12, 45), (1234, 567), (12345, 0), (678, 123456)]
max_length = 0
for key,value in c:
list1 = []
list2 = []
for i in str(key):
list1.append(i)
for j in str(value):
list2.append(j)
if (len(list1)>len(list2)): max_lengt
Sarika Shrivastava wrote:
> Input :
> c=[(12,45),(1234,567),(12345,0),(678,123456)]
>
> #o/p==1425
> #o/p==1526374
> #0/p==102345
> #o/p===617283456
>
> Question explanation:
>
> in list c we have some tuples so I need to take tuple value one by one and
> change the position of value like wise
Input :
c=[(12,45),(1234,567),(12345,0),(678,123456)]
#o/p==1425
#o/p==1526374
#0/p==102345
#o/p===617283456
Question explanation:
in list c we have some tuples so I need to take tuple value one by one and
change the position of value like wise
first tuple value (12 ,45) then then 1 we pick u
On Tue, 25 Apr 2017 23:27:05 +0100
Alan Gauld via Tutor wrote:
> Your messages come into the moderation queue, I'm
> not sure why because the moderation flag is not
> set on your account(it is automatically for new
> members).
>
> I'll have a closer look next eek when I get back.
Thanks Alan,
18 matches
Mail list logo