difference between string and list

Paul Rubin http
Tue Feb 27 15:22:13 EST 2007


"lincoln rutledge" <lincolnr at oar.net> writes:
> strings have methods like string.count("f") returns 1.  What methods do
> lists have?  Is it a similar class to string?

Strings and lists are similar but not the same.  dir(string) will show
you the methods available for strings.  dir(list) will show you the
methods available for lists.  See also the "built-in types" section
of the Python Library Reference Manual, the section on sequence types.



More information about the Python-list mailing list