[Tutor] Print elements of list with newlines
Cameron Simpson
cs at cskk.id.au
Fri Oct 22 19:03:12 EDT 2021
On 22Oct2021 16:58, Julius Hamilton <juliushamilton100 at gmail.com> wrote:
>Is there any way to print the elements of a list one by one on new
>lines, in a brief single line of code, as opposed to:
>
>for item in list:
> print(item)
Well, there's:
for item in list: print(item)
A better question might be: why do you want to?
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Tutor
mailing list