Array Indexing: Difference between array[:] and just array? (in python)

Could you please help to understand the difference between the below statements:

Let matrix be a square matrix
A = [ item[:] for item in matrix ]
B = [ item for item in matrix ]

check this thread:

1 Like