Python question
The following code achieves the task of adding commas and apostrophes, therefore splitting names in the list. However, in the case where both first and last names are given how would I "tell"/write a code that understands the last name and doesn't split them both. For example 'Jack Hansen' as a whole, rather than 'Jack' 'Hansen'.
names = "Jack Tomas Ponce Ana Mike Jenny"
newList = list(map(str, names.split()))
print(newList) #now the new list has comma, and apostrophe