How to print list without brackets in python?


I have a list [1,2,3,4] and I'm trying to print it. But it is always printing like [1,2,3,4] How can i remove those brackets?

1 Answer

4 years ago by

You can simply do that like,

a = [1,2,3,4]
print(*a, sep=","]

Check Output here

4 years ago by Divya