title: Stratified train/validation/test split without scikit-learn
body: <p>I'm working on the mnist dataset with 1797 images indicating 0 to 10 digits. I want to split the dataset into the train, validation, and test sub-data so that the same number of each digit is specified for each sub_data. How can I do stratification without sklearn library in python?</p>
  <p>Thank you for your answer in advance.</p>