I'm looking for the best way to write a function that takes a string in the form:
"First" "First Last" "First Middle Last" "First M. Last" "First Second Third Last"
And can return a python a list with each of the values separated.
Thanks.
I'm looking for the best way to write a function that takes a string in the form:
"First" "First Last" "First Middle Last" "First M. Last" "First Second Third Last"
And can return a python a list with each of the values separated.
Thanks.
Use the split function:
>>> s = "First Middle Last"
>>> s.split(" ")
['First', 'Middle', 'Last']