appending values to an array for every iteration

Define test_index and train_index as empty list:

test_index = []

Then use append method:

test_index.append(test[i])

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top