L
lincoln rutledge
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 have? Is it a similar class to string?
thanks,
Lincoln
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 have? Is it a similar class to string?
thanks,
Lincoln