I have the following setup in a directory named `apartments`:

```
apartments:
 |_Blue
     |__apartmentBlue1.xml
        apartmentBlue2.xml
        apartmentBlue3.xml
        nonsense.txt
  |_Red
      |_apartmentRed1.xml
        apartmentRed2.xml
        apartmentRed3.xml
  |_nonsense

```

I'm trying to get the file path for every file in every directory if that file ends with `.xml`

**This is my code:**

```
source: c:\data\desktop\buildingX\appartments

for root, dirs, files in os.walk(source):
    for file in files:
        for diro in dirs:
            if file.endswith('.xml'):
                file_path = os.path.join(source, diro, file)
                print(file_path)

```

This gives me the desired output but I'm worried about the fact that my for loop is to nested, I would like to do more things with those paths but I feel like the further I nest it the more problems I will get. Are there any other ways to get it the file paths in a more compact way?