from random import shuffle
from glob import glob
import shutil

file_images = glob(r"\*.jpg")
file_labels = glob(r"\*.txt")


files = list(zip(file_images, file_labels))


shuffle(files)

file_images, file_labels = zip(*files)


number_of_pictures = len(file_images)
print(number_of_pictures)

count = 0
for images in file_images:
    if count < 0.7*number_of_pictures:
        shutil.copy2(images, r"")
    else:
        shutil.copy2(images, r"")
    count += 1

count = 0
for labels in file_labels:
    if count < 0.7*number_of_pictures:
        shutil.copy2(labels, r"")
    else:
        shutil.copy2(labels, r"")
    count += 1
