DEV Community

Discussion on: Daily Challenge #37 - Name Swap

Collapse
 
peter279k profile image
peter279k

Here is the simple solution with Python:

def name_shuffler(string):
    string_array = string.split(' ')

    return string_array[1] + ' ' + string_array[0]