How to print array/list without sections in python?

530    Asked by GrahamCook in Python , Asked on Mar 3, 2021
Answered by Graham Cook

It is extremely easy to do that in python. You can basically utilize python's join strategy on a string. Like this:


names = ["A", "B", "C"]

print(', '.join(names))

It will print:

A, B, C



Your Answer

Interviews

Parent Categories