Feb-04-2017, 03:57 AM
def splice(): name = raw_input('Enter name and age.\n> ') result = name.split() add_comma = result[:1] + [', '] + result[1:] new = ''.join(add_comma) print (new) splice()input:
John 56
output:
John, 56
Is there a better way to do this?