The City of Pixland

In the bustling city of Pixland, images are lost in the vast landscape of directories and subdirectories in the computer systems. Your job as the city's resident image finder is to locate all the JPEG images and list them out. These JPEG images can be identified by their extensions, .jpeg or .jpg.
Your mission is to create a Python program that will start from the current directory and traverse through all of its subdirectories. The program should look for JPEG image files and print out the complete path for each image file found.
The program does not require any input from the user. The output, however, should consist of the full paths of all the JPEG images found in the current directory and all its subdirectories. Each path should be printed on a new line.
The current directory from which the program is being run is assumed to be the root directory for the search operation.
Input
Output
/home/user/Images/holiday/photo1.jpg /home/user/Images/holiday/photo2.jpg /home/user/Work/projectA/design.jpg /home/user/Work/projectA/subfolder/concept.jpg
Note: The output paths are examples, they will vary depending on the actual directory structure and image file locations in your system.
 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue