sarl
sarl

Reputation: 23

Pretty print a julia set

Is there a quick function without looping etc to pretty print the items in a set without the "Set(Any[])" in Julia? Have searched to no avail.

I'm printing the output to use for a latex table and want the output Set(Any["a","b","c"]) to just read a,b,c.

Upvotes: 1

Views: 116

Answers (1)

Dan Getz
Dan Getz

Reputation: 18227

One way to get the string is:

join(s|>collect|>sort,',')

If the order of the elements can be more chaotic then join(s,',') is enough and more performant.

Upvotes: 1

Related Questions