# prefect-community

Shuchita Tripathi

04/26/2022, 2:28 PM
Hi, I have a scenario where I need to modify the output of one task and pass it to the other. Is modification of task output and then passing possible? I am asking this because defining the tasks within flow does not execute them. So the output is not available. eg (is something like below possible): with Flow("flow") as f: abc = task1() # some modification required for 'abc' (return value of task1()). Modification like extracting a part of string from a longer string. modified_abc = # "string extraction from abc" def = task1(modified_abc)

Kevin Kho

04/26/2022, 2:30 PM
You would need to put the modification inside a task also so that the execution is deferred.
👍 1