Characters contain themselves?

Azolex cretin at des.alpes.ch
Mon Apr 10 07:41:59 EDT 2006


WENDUM Denis 47.76.11 (agent) wrote:
> 
> While testing recursive algoritms dealing with generic lists I stumbled 
> on infinite loops which were triggered by the fact that (at least for my 
> version of Pyton) characters contain themselves.

Note that the empty string is contained in all strings, including itself.

 >>> bool('')
False
 >>> '' in ''
True



More information about the Python-list mailing list