Not Responding When Dealing with Large Data
MRAB
python at mrabarnett.plus.com
Thu Jun 19 12:54:07 EDT 2014
On 2014-06-19 17:21, Peter Pearson wrote:
> On Thu, 19 Jun 2014 12:25:23 +0100, MRAB <python at mrabarnett.plus.com> wrote:
> [snip]
>> and then you can say:
>>
>> def myCase(c):
>> if len(c) < 8 or len(c) > 80:
>> return False
>>
>> if c in mySet:
>> return False
>>
>> return True
>>
>> which can be shortened to:
>>
>> def myCase(c):
>> return 8 <= len(c) <= 80 and c in mySet
>
> Don't you mean . . .
>
> return 8 <= len(c) <= 80 and c not in mySet
> ?
>
Yes, you're right.
More information about the Python-list
mailing list