Hi,
I'm trying to write a little script to clean my directories. In fact I have:
pattern = re.compile(format[i])
...
current_f.append(pattern.search(str(ls)))
and I want to use a list comprehension but when I try:
In [25]: [i for i in current_f.group(0)]
I get:
AttributeError: 'list' object has no attribute 'group'
So how to make a list comprehension using group()? Is there another way to do what I want.
Thanks in advance.