def switch_axis_limits(ax, which_axis):
    '''
    Switch the axis limits of either x or y. Or both!
    '''
    for a in which_axis:
        assert ('x', 'y') in a
        ax_limits = ax.axis()
        if a == 'x':
            ax.set_xlim(ax_limits[1], ax_limits[0])
        else:
            ax.set_ylim(ax_limits[3], ax_limits[2])
dataset/ETHPy150Open olgabot/prettyplotlib/prettyplotlib/__init__.py/switch_axis_limits/swapped operands of `in`