I'm still a beginner at Python, and was doing some simple code just to exercise. I defined a list with some names, so I could print it afterwards, but I can't really do it the way I want.
I did it kind of like this:
names = ['John', 'Karl', 'Anne', 'Beth']
print("Those kids' names are {}.".format(names))
It returns "Those kids' names are ['John', 'Karl', 'Anne', 'Beth']."
I wanted it to be displayed without the brackets ([]) and the quotes (''), like this: "Those kids' names are John, Karl, Anne, Beth."
Is there a way to do that?
Use
str.jointo join an iterable of strings with a given separator.