Alpha Numeric Input Mask

I’ve been looking for an input mask for Python that requires/allows a capital letter or numeric digit to be entered. Other languages used X but I haven’t found anything that looks like it would work in python.

Any help would be greatly appreciated.