On Thu, 27 Apr 2017 11:49:55 +0200
Peter Otten <__pete...@web.de> wrote:
> I'd like to bring to your attention the discard() method
>
> >>> s = {1, 2, 3}
> >>> s.discard(int(v))
> >>> s
> {2, 3}
>
> which allows you to avoid building the throwaway single-entry set.
Thank you Peter. I have been
On 26Apr2017 22:51, Tim Peters wrote:
[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
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 as {1,2,3} and again I want
F means print it in uppercase. That's really an edge case for a float, that
would only apply to the special values infinity and not-a-number.
On April 26, 2017 8:08:16 PM MDT, boB Stepp wrote:
>My Google-fu must be weak tonight. I cannot find any discernible
>difference between '%f' % and '%F'
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 cure another bug.
>
> So, I have a set represented in the debugger as {1,
Peter Otten wrote:
> 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
> If that's not enough to get a working solution you may come back here once
> you have some code.
OK, won't happ