def part1():
    print('part1 expensive computation running')
return 'This was expensive to compute'

def part2(value):
    print('part2 running with %s' % value)
Keep persistent variables in memory between runs of Python script