/* */

Wednesday, 23 March 2011

-Join

Joins the elements of a sequence, does the opposite of split:
seq = [1,2,3,4,5]
sep = '+'
sep join(seq)

This would give an error because we are trying to join a list of numbers with an opeator. If the sequence consisted of:
['1','2','3','4','5']
the reult would be different
'1+2+3+4+5'

No comments:

Post a Comment