>>> f = ['carta.txt', 'resum.docx', 'viva_la_vida.mp3', 'podcast1.mp4', ... 'perfil.jpeg', 'doc.txt', 'som_foc.mp3', 'a.b.txt'] >>> d = extensions(f) >>> d == {'txt': ['carta', 'doc', 'a.b'], ... 'docx': ['resum'], ... 'mp3':['viva_la_vida', 'som_foc'], ... 'mp4': ['podcast1'], 'jpeg': ['perfil']} True