puncs = set(string.punctuation)
[i for i in x if all(j.isdigit() or j in puncs for j in i) and any(j.
    isdigit() for j in i)]
Filtering out strings that only contains digits and/or punctuation - python