A = [2, 3, 4, 5]B = [A[:] for n in range(5)]#and prove that they are unique print ('reference sharing? {}'.format (B [0] is B [1]))print (B)
Standard input is empty
reference sharing? False [[2, 3, 4, 5], [2, 3, 4, 5], [2, 3, 4, 5], [2, 3, 4, 5], [2, 3, 4, 5]]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!