string = "Is your name Jack ? Wasn\'t your name Matthew ?" split_string = string.split() find_names = split_string[split_string.index("name") +1]