I wrote some code in two different ways which I thought were exacly equivalent but I got two very differnt answers:
This first way worked exactly as expected:
test_listA = list(range(0, 5))
random.shuffle(test_listA)
print(test_listA)
It printed out:
[2, 1, 0, 3, 4]
But when I reorganised it like so:
test_listB = random.shuffle(list(range(0, 5)))
print(test_listB)
It prints out:
None
Why the difference?