I have a list of names and I want to print each element of the list in a different line without a for loop. So, after some research I found this example: print(*names, sep='\n'), witch results in exactly what I want. But what does this * character before the list name means?
The * is used to unpack argument lists when calling a function. In this case it unpacks your list of names.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With