Alex
unread,Jan 7, 2016, 5:47:31 AM1/7/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to julia-users
Hello,
I have a collection of items which I need to write into the file line by
line:
A=[(item1_1, item1_2, ...), (item2_1, item2_2, ...), ...]
Line 1: item1_1, item1_2, ... \n
Line 2: item2_1, item2_2, ... \n
...
In order to do that I need to concatenate all elements in A[i] into the
string. In Python I would do it very quickly using .join function like that:
# List of tuples:
> a=[(1,2,"a"), (4,5,"g")]
# Join elements into the string
> " ".join(str(x) for x in a[0])
Out: '1 2 a'
> " ".join(str(x) for x in a[1])
Out: '4 5 g'
Is it some equivalent for this function in Julia?
--
Alex