You could use split method to easily separate extension from filename and you could have a similar dictionary:
{"py": "python", "txt": "text", ...}
to know which extension represents which file.
7th Jun 2020, 9:53 AM
Seb TheS
Vous avez souvent des questions comme celle-ci ?
Apprenez de maniĂšre plus efficace, gratuitement :