fork(4) download
  1. # your code goes here
  2.  
  3.  
  4. from random import shuffle
  5.  
  6. foo = []
  7. foo.append([1, 2, 3])
  8. foo.append([4, 5, 6])
  9. foo.append([7, 8, 9])
  10.  
  11. shuffle(foo)
  12. for ii, sublist in enumerate(foo): shuffle(foo[ii])
  13.  
  14. print(foo)
Success #stdin #stdout 0.15s 12248KB
stdin
Standard input is empty
stdout
[[8, 7, 9], [1, 2, 3], [5, 4, 6]]