Newby question: I'm having trouble figuring out why the code below doesn't work. I'm trying to make a nested list wherein each of the 10 nested lists is in a different order. What I get instead is the same list repeated 10 times in the same order.
So I want: [[1, 2, 4, 3], [4, 2, 3, 1], [2, 4, 3, 1]]
but I get: [[2, 3, 1, 4], [2, 3, 1, 4], [2, 3, 1, 4]]
<pre>from random import shuffle
myList = ["file1", "file2", "file3", "file4"]
longList = []
for x in range(0,10):
shuffle(myList)
longList.append(myList)
print(longList)<code>
Thanks in advance!
D