quick py solution