-
Is it possible to customise the behaviour of list printing? Current behaviour:
Instead I'd like to print the list with each element on a new line, eg:
|
Beta Was this translation helpful? Give feedback.
Answered by
geekya215
Mar 31, 2023
Replies: 1 comment 4 replies
-
you should unpack the list parameter, and set the default separator to console.print(*["a", "b", "c"], sep='\n') get more detailed information from here |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
tekumara
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you should unpack the list parameter, and set the default separator to
\n
get more detailed information from here