I don't quite understand what is happening in the below code. Is it creating a copy of a nested list? If so, how is it doing it? What is b equal to?
a = [[1,2,3],[4,5,6]]
b = [x[:] for x in a]
I don't quite understand what is happening in the below code. Is it creating a copy of a nested list? If so, how is it doing it? What is b equal to?
a = [[1,2,3],[4,5,6]]
b = [x[:] for x in a]