# {"skip": true}
def wiggle_sort(nums):
    """
    Sorts a list of numbers
    """

    for i in range(len(nums)):
        if (i % 2 == 1) == (nums[i - 1] > nums[i]):
            nums[i - 1], nums[i] = nums[i], nums[i - 1]

9a04726a7b05aa22352c8cde68adbeaf920da8e5
<mask token>

def wiggle_sort(nums):
    """
    Sorts a list of numbers
    """
    for i in range(len(nums)):
        if (i % 2 == 1) == (nums[i - 1] > nums[i]):
            nums[i - 1], nums[i] = nums[i], nums[i - 1]

# {"skip": true}
def wiggle_sort(nums):
    """
    Sorts a list of numbers
    """

    for i in range(len(nums)):
        if (i % 2 == 1) == (nums[i - 1] > nums[i]):
            nums[i - 1], nums[i] = nums[i], nums[i - 1]
