fork download
  1. arr=[0]*10
  2. print( id(arr) )
  3. arr[5:]=[]
  4. print( id(arr) )
  5. #-------------------------
  6. arr2=[0]*10
  7. print( id(arr2) )
  8. arr2=arr2[:5]
  9. print( id(arr2) )
  10.  
Success #stdin #stdout 0.02s 9012KB
stdin
Standard input is empty
stdout
47014191538376
47014191538376
47014192020872
47014191538440