list(y for y in x if y[-1].isdigit())) meaning code example Example: isdigit python s='12' s.isdigit()#returns True