Python Right Shift Functional Med