0
[Python] Why does print(random.shuffle([1,2,3])) return None?
This is not the case on my computer.
1 Answer
+ 5
the shuffle method of the random module does return None.
to print the shuffled list do:
L = [1,2,3]
random.shuffle(L) # shuffles list in place and returns None
print(L)