def seperate_classes (list_of_images_training): needed_class_list = [list_of_images_training[start:start+240] for start in range(0,len(list_of_images_training),240)