some PE solutions in Python