I was going through a college assignment on KNN given in python and in that assignment there was one block of code where they delete X_train,Y_train,X_test and Y_test variables before assigning those variables to other data. And in the comments they added that it prevents memory issues.
x = large_dataset
del x
x = another_large_datset // block 1
x = large_dataset
x = another_large_datset // block 2
what would be the difference between the above two blocks of code.
Thanks :)