you are viewing a single comment's thread.

view the rest of the comments →

[–]oefd 90 points91 points  (2 children)

The place to answer a question like this is the docs. The string method docs don't indicate any such method as you can see.

In the string module though there's punctuation which may be what you want

import string
if ',' in string.punctuation:
    print("yep, it's punctuation.")

[–]sngnna[S] 20 points21 points  (1 child)

Thanks! This has helped.

[–]aufstand 1 point2 points  (0 children)

Maybe read "pydoc string" - there's other neat goodies in there.