Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Ruby

Idiom #243 Print list

Print the contents of the list or array a on the standard output.

puts a.join(", ")

Prints a single line, with a separator between elements
puts a * ", "

This is equivalent to join
puts a

This prints 1 element of a per line
(print a)

New implementation...