Fix Python – How to get the return value from a thread in Python?

The function foo below returns a string ‘foo’. How can I get the value ‘foo’ which is returned from the thread’s target?
from threading import Thread

def foo(bar):
print(‘hello {}’.format(bar))
return ‘foo’

thread = Thread(target=foo, args=(‘world!’,))
return_value = thread.join()

The “one obvious way to do it”, shown abo….