[Tutor] Not workin!

Luke Paireepinart rabidpoobear at gmail.com
Wed Sep 30 07:32:57 CEST 2009


Oops, thanks for catching that one Marty. I thought they both
evaluated to false.

On 9/29/09, Martin Walsh <mwalsh at mwalsh.org> wrote:
> Luke Paireepinart wrote:
>> In this case you are saying "is their input equal to this list with many
>> elements?" and the answer is always going to be No because a string
>> won't be equal to a list unless both are empty.
>
> I know you probably didn't mean this as it reads, or as I'm reading it,
> but an empty string and an empty list aren't 'equal' either.
>
> In [1]: '' == []
> Out[1]: False
>
> HTH,
> Marty
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>

-- 
Sent from my mobile device


More information about the Tutor mailing list