Cody Bable

Generation

generate functionWed, 19 Apr 2023

remove punctuations from a sentence and split the sentence into a list

def split_sentence(sentence): sentence = sentence.replace(',', '').replace('.', '').replace('?', '').replace('!', '') return sentence.split(' ') split_sentence('Hello, world.')

Questions about programming?Chat with your personal AI assistant