fork download
  1. # your code goes here
  2.  
  3. n=3
  4. adj = [[]]*n
  5.  
  6. print adj
  7.  
  8. adj[0].append(1)
  9.  
  10. print adj # expecting [[1], [], []]
Success #stdin #stdout 0s 23304KB
stdin
Standard input is empty
stdout
[[], [], []]
[[1], [1], [1]]