landmarks_path = r"G:\陈伟峰\AI\深度学习\数据集\CelebA\Anno\list_landmarks_align_celeba.txt"
bbox_path = r"G:\陈伟峰\AI\深度学习\数据集\CelebA\Anno\list_bbox_celeba.txt"
save_path = "anno.txt"
with open(landmarks_path, "r") as f:
    landmarks = f.readlines()
with open(bbox_path, "r") as f:
    bbox = f.readlines()
with open(save_path, "w") as f:
    for i, (line1, line2) in enumerate(zip(bbox, landmarks)):
        if i < 1:
            f.write(line1)
        elif i == 1:
            strs = line1.strip() + " " + line2
            f.write(strs)
            # f.write(line2)
        else:
            strs = line1.strip().split() + line2.strip().split()[1:]
            strs = " ".join(strs) + "\n"
            f.write(strs)
landmarks_path = r"G:\陈伟峰\AI\深度学习\数据集\CelebA\Anno\list_landmarks_align_celeba.txt"
bbox_path = r"G:\陈伟峰\AI\深度学习\数据集\CelebA\Anno\list_bbox_celeba.txt"
save_path = "anno.txt"
with open(landmarks_path, "r") as f:
    landmarks = f.readlines()
with open(bbox_path, "r") as f:
    bbox = f.readlines()
with open(save_path, "w") as f:
    for i, (line1, line2) in enumerate(zip(bbox, landmarks)):
        if i < 1:
            f.write(line1)
        elif i == 1:
            strs = line1.strip() + " " + line2
            f.write(strs)
            # f.write(line2)
        else:
            strs = line1.strip().split() + line2.strip().split()[1:]
            strs = " ".join(strs) + "\n"
            f.write(strs)
# f.write(line2)