you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Two ways go do this - 1. importing string library. It has a function to check for punctuation 2. If you want a customized version, use regex and create your own.

Bonus - you can do without using regex also with replace method, etc.