Implode php en python

En PHP para poder separar con algún delimitador un arreglo en forma automática existe la función implode, en python podemos hacer algo similar con la función join


tmp = [1,2,3,4,5]
','.join( map( str, tmp ) )

Y tendremos ’1,2,3,4,5′ :)

Leave a Comment

*


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">

Rss Feed Tweeter button Facebook button Technorati button Reddit button Linkedin button Webonews button Delicious button Digg button Flickr button Stumbleupon button Newsvine button Youtube button