how tranform in String??

Christophe Delord christophe.delord at free.fr
Wed Jun 19 19:07:44 CEST 2002


Hi,

You may want to use split.

For example:

In [1]: s='xavante brasil'

In [2]: s=s.split()

In [3]: s
Out[3]: ['xavante', 'brasil']

In [4]: s='xavante,brasil'

In [5]: s=s.split(',')

In [6]: s
Out[6]: ['xavante', 'brasil']

In [7]:


Christophe.


On Tue, 18 Jun 2002 18:49:37 -0300
jubafre at zipmail.com.br wrote:

> i have s='xavante brasil', i want to transform in
> 
> s='xavante', 'brasil' with two indexes
> 
> how i make this???????????
> 
> 
> Juliano Freitas
> www.gebrasil.hpg.com.br
> 
> 
> 
> ------------------------------------------
> Use o melhor sistema de busca da Internet
> Radar UOL - http://www.radaruol.com.br
> 
> 
> 
> 
> 


-- 

(o_   Christophe Delord                   _o)
//\   http://christophe.delord.free.fr/   /\\
V_/_  mailto:christophe.delord at free.fr   _\_V



More information about the Python-list mailing list