training and testing data in python