from random import randint
class Solution(object):

    def __init__(self, nums):
        """
        :type nums: List[int]
        """
        self.nums = nums

    def reset(self):
        """
        Resets the array to its original configuration and return it.
        :rtype: List[int]
        """
        return self.nums

    def shuffle(self):
        """
        Returns a random shuffling of the array.
        :rtype: List[int]
        """
        out = self.nums[:]
        n = len(self.nums)
        for i in xrange(n - 1):
            r = randint(i, n - 1)
            if r != i:
                out[r], out[i] = out[i], out[r]
        return out



# Your Solution object will be instantiated and called as such:
# obj = Solution(nums)
# param_1 = obj.reset()
# param_2 = obj.shuffle()

Add py solution for 384. Shuffle an Array