Why does Python show the whole array?

Peter Otten __peter__ at web.de
Thu Apr 9 18:46:16 CEST 2009

John Posner wrote:

> Given how common string maniuplations are, I guess I'm surprised that
> Python hasn't yet made "contains()" into both a "string"-module function
> *and* a string-object method.

Could you explain why you prefer 'contains(belly, beer)'
or 'belly.contains(beer)' over 'beer in belly'? The last form may be a bit
harder to find in the documentation, but once a newbie has learned about it
he'll find it easy to remember.


More information about the Python-list mailing list