Format your output

Created on Jan. 22, 2018 by Jérôme Schneider

Provide a function named list_pretty_print, taking a single parameter: a list of integers.

Your function should display 5 integers per line, separated by , (coma space).

The last line is allowed to contain less than 5 integers just in case the number of provided integers is not divisible by five.

Example

list_pretty_print([42] * 6)

should give:

42, 42, 42, 42, 42
42
  • There's no corrections yet, hit the `Submit` button to send your code to the correction bot.
  • Keyboard shortcuts:
    • Ctrl-Enter: Send your code to the correction bot.
    • Escape: Get back to the instructions tab.
(Ctrl-Enter)