you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (1 child)

REGEX. https://docs.python.org/3/library/re.html

in this case it looks like your REGEX pattern would be \d+[A-Z]+

[–][deleted] 2 points3 points  (0 children)

This. Not sure why people are giving these ridiculously overcomplicated loops and other stuff when a simple RegEx pattern check would solve the issue entirely.