Characters contain themselves?

Rene Pijlman reply.in.the.newsgroup at my.address.is.invalid
Fri Apr 7 10:13:52 EDT 2006


WENDUM Denis 47.76.11 (agent):
>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.

No, strings contain characters. And 'a' is a string consisting of one
character.

"The items of a string are characters. There is no separate character
type; a character is represented by a string of one item."
http://docs.python.org/ref/types.html

(One item of what type, one might ask)

-- 
René Pijlman



More information about the Python-list mailing list