some questions
Batista, Facundo
FBatista at uniFON.com.ar
Mon Jul 14 14:54:54 EDT 2003
The method string.split() returns a list:
>>> s = "This is an example"
>>> s.split()
['This', 'is', 'an', 'example']
>>> s
'This is an example'
Be warned that split *returns* a string, does *not* modifies the string
itself (as you can see above, s is still the original s).
As a tutorial, I love "Dive into Python".
. Facundo
#- -----Mensaje original-----
#- De: Andreas Bauer [mailto:buki at bukis.org]
#- Enviado el: Lunes 14 de Julio de 2003 3:27 PM
#- Para: python-list at python.org
#- Asunto: some questions
#-
#-
#- Hi,
#-
#- I need some information on how to deal with strings which I have
#- divided by using split(). I'm new to python and don't know how to
#- handle these split up strings.
#- And I some one could recommend a good tutorial I would be very
#- glad. Can't hardly find any.
#-
#- Thanks in advance.
#-
#- Andreas
#- --
#- http://mail.python.org/mailman/listinfo/python-list
#-
More information about the Python-list
mailing list