1
Fala galera,
I need help listing all directories that contain "_new", for example:
/var/www/site_novo/teste
already started the code to get the _new directories, it finds the same, but I need it to return me the path completely as in the previous example, but it is returning me only a list with ['site_novo1', 'site_novo2'] follows code below:
import re
rx = re.compile(r'_novo')
print(list(filter(rx.search, os.listdir('.'))))
Que me devolve a seguinte saída:
['site_novo1', 'site_novo2', 'site_novo3']
But I would like to be returned with the whole path.
Att,
Thank you very much for your contribution!
– Léo B