Post

PythonPython

christina joce

Posted on 23rd April 2024|34 views

0
votes

Python Print List Without Brackets

Is there any possible way in python to print list without brackets?

Answers
P
Sowjanya Kodiganti

Posted on 23rd April 2024

Yes you can print list without brackets use * to do so, here is the example

li = ["x", "y", "z"]

print(*li, sep = ", ")

Output:

x, y, z

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos