You are comparing a string value with string class, so they can't be
compared. You can do:
>>> type("love") is str
True
>>>
so you compare types
2011/9/18 Khalid Al-Ghamdi <[email protected]>
> Hi All,
>
> why is this so?
>
> >>> type('love')
> <class 'str'>
> >>> "love" is str
> False
> >>>
>
> _______________________________________________
> Tutor maillist - [email protected]
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor