What replaces the old `flatten` call in Prefect 2....
# prefect-community
What replaces the old
call in Prefect 2.0? I have a list of lists after mapping tasks and I used to be able to use
to coalesce that into a single large list.
👀 1
interessted in this to... currently i do it by myself...but would be great if there will be something out of the box
Copy code
flatten_files = [
        for unzipped_file in unzipped_files
        for file in unzipped_file.wait().result()
I think Timos approach seems like the right approach. Given that you can run any Python now, flatten is no longer really required but if you want to, you can open a feature request on GitHub and describe why doing it in Python without extra abstraction doesn't work for you and what the proposed alternative would look like. It would be better to not think how this is tackled in 1.0 but rather what you think the right solution would look like if you wouldn't know 1.0 before. Thanks in advance