How To Add Constraints In Python