I am very fresh to python. As part of an assignment, I've written the following code to remove punctuation from a string and convert it to lowercase.
import string words = "Dave, Laura, Maddy, Dave, Laura, Maddy, Dave, Laura, Dave"; translation = str.maketrans("","", string.punctuation); new = words.translate(translation); lower = new.lower();
However, this seems crude to me and I feel like I can accomplish my task with fewer function calls/less code. Does anyone have any suggestions as to how I could do this?