https://prefect.io logo
t

Tyndyll

07/26/2022, 10:20 AM
I have a task which will return a list, is it possible to use case based on the length of the returned list? e.g.
Copy code
data = returns_list()
with case(data, len(data) > 1):
    do_stuff_with_data(data)

with case(data, len(data) == 0):
    do_stuff_with_no_data()
1
Got around it by adding a testing task
🙌 1
a

Anna Geller

07/26/2022, 12:15 PM
well done!
3 Views