Cody Bable

Generation

generate functionWed, 19 Apr 2023

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

def remove_punc_and_split(s): return "".join([w for w in s if w not in string.punctuation]).split() remove_punc_and_split("I love NLP!")

Want to kickstart your project?Use the new AI Studio to create your code