Python Compare All Elements Powers