En Tue, 27 Feb 2007 18:00:25 -0300, lincoln rutledge <[EMAIL PROTECTED]>
escribió:
> Okay, I actually have those pages up in my browser. I found the string
> methods:
> http://docs.python.org/lib/string-methods.html
>
> But I am having trouble finding the same information for lists...
On that
Hi Skip,
Okay, I actually have those pages up in my browser. I found the string
methods:
http://docs.python.org/lib/string-methods.html
But I am having trouble finding the same information for lists...
Thanks I will look into it some more,
Lincoln
>>> <[EMAIL PROTECTED]> 02/27/07 3:28 PM >>>
lincoln rutledge a écrit :
> I'm having trouble figuring out the difference between a string and a
> list.
['R', 'e', 'a', 'l', 'l', 'y', ' ', '?', ' ', 'S', 'e', 'e', 'm', 's', '
', 'q', 'u', 'i', 't', 'e', ' ', 'o', 'b', 'v', 'i', 'o', 'u', 's', ' ',
't', 'o', ' ', 'm', 'e', '.']
> I know th
lincoln> strings have methods like string.count("f") returns 1. What
lincoln> methods do lists have? Is it a similar class to string?
Similar in some ways, different in others. Some things to play with:
1. At an interpreter prompt, execute:
help("")
help([])
"lincoln rutledge" <[EMAIL PROTECTED]> 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 sho
I'm having trouble figuring out the difference between a string and a
list.
I know that:
string = "foo bar"
is a list of characters, "foo bar", and string[0] is "f".
while:
list = ["foo", "bar"]
and list[0] is "foo".
strings have methods like string.count("f") returns 1. What methods do
lists