Answers for "python convert list to string with brackets"

1

python list to string without brackets

names = ["Sam", "Peter", "James", "Julian", "Ann"]
print(", ".join(names))
#OR
names = ["Sam", "Peter", "James", "Julian", "Ann"]
print(*names, sep=", ")
Posted by: Guest on January-25-2021
1

python list to string without brackets

print(', '.join(names))
Posted by: Guest on November-02-2020

Code answers related to "python convert list to string with brackets"

Python Answers by Framework

Browse Popular Code Answers by Language