问题 input = ['beleriand','mordor','hithlum','eol','morgoth','melian','thingol'] I'm having trouble creating X number of lists of size Y without repeating any elements. What I have been doing is using: x = 3 y = 2 import random output = random.sample(input, y) # ['mordor', 'thingol'] but if I repeat this then I will have repeats. I would like the output to be something like [['mordor', 'thingol'], ['melian', 'hithlum'], ['beleriand', 'eol']] since I chose x = 3 (3 lists) of size y = 2 (2 elements