Mode Calculation In Python A Type