I may have misunderstood your needs, but I’d just stick it in a python variable as you normally would. e.g.
for stuff in some_list:
    output = do_stuff_with(stuff)
    # compare temp and out
    temp = output