import os
import shutil

def sort_photos():
    path = os.path.expanduser("~/Downloads")
    img_folder = os.path.join(path, "Photos")

    os.makedirs(img_folder, exist_ok=True)

    for file in os.listdir(path):
        if file.lower().endswith((".jpg", ".jpeg", ".png")):
            shutil.move(
                os.path.join(path, file),
                os.path.join(img_folder, file)
            )
            print(f"Moved Photo: {file}")
