Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren1 Antwort
+ 4
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.