All problems
Seeded Shuffle of Image List
Problem
Shuffle a list of images with a seeded random shuffle.
Seed the random module with seed, shuffle the positions with random.shuffle and return the reordered list.
Test cases
case 1
in: [[[[1]],[[2]],[[3]],[[4]]],7]
expected: [[[4]],[[2]],[[1]],[[3]]]
case 2
in: [[[[1]],[[2]],[[3]],[[4]]],0]
expected: [[[3]],[[1]],[[2]],[[4]]]
case 3
in: [[[[1]],[[2]]],3]
expected: [[[2]],[[1]]]
Starter codePython
def shuffle_images(images, seed):
# Your code here
pass3 test cases · run your code against them in the editor