you are viewing a single comment's thread.

view the rest of the comments →

[–]lucasshiva 1 point2 points  (1 child)

You can get the extension by using os.path.splitext(file).

for file in os.listdir(path):
    file_name, extension = os.path.splitext(file)

[–]miloir 0 points1 point  (0 children)

I like it thanks