import rewords = {"blue", "ah", "sky", "wow", "neat"}rx = re.compile(r'(?:[^\W\d_]{2})+')print( [w for w in words if rx.fullmatch(w)] )
Standard input is empty
['blue', 'ah', 'neat']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!