Retrieve File Extensions from Directory Path using Python

Prompt

Result