PYTHON join

is this article helpful?
|
Python replacement for PHP's join [ edit | history ]
glue.join(pieces)


alternatively way:
reduce(lambda x,y: str(x) + glue + str(y), pieces)



#example
' - '.join(['apple','banana','pear'])

#example
reduce(lambda x,y: str(x) + ' - ' + str(y), ['apple','banana','pear'])

PHP join

PHP original manual for join [ show | php.net ]

join

(PHP 4, PHP 5)

joinAlias of implode()

Description

This function is an alias of: implode().