The snippets does not execute the for loop after the file_counts = len(list(images)). If I drop this line, the loop is working fine. I wonder what happened. Is there anyone who can help me to explain and fix it?
from pathlib import Path
print(Path.cwd())
path = Path.cwd()
images = path.glob('*.jpg')
file_counts = len(list(images))
for image in images:
print(f" file is {images} ")