Blog

¿Qué hace el siguiente código?

import os

for file in os.listdir(“/mydir”):

if file.endswith(“.txt”):

print(os.path.join(“/mydir”, file))