def wiggleSort(self, nums):
        for i in xrange(1, len(nums)):
            if ((i % 2) and nums[i - 1] > nums[i]) or \
                (not (i % 2) and nums[i - 1] < nums[i]):
                # Swap unordered elements.
                nums[i - 1], nums[i] = nums[i], nums[i - 1]
tests True function updated.
dataset/ETHPy150Open kamyu104/LeetCode/Python/wiggle-sort.py/Solution.wiggleSort--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/boto_lambda_test.py/BotoLambdaFunctionTestCase.test_that_when_updating_function_code_from_s3_succeeds_the_update_function_method_returns_true