There are 2 ways of achieving this. First of all you can just simply return b along with 'more work to do' like this:
a=1
def choice():
if a==1 :
b = 'cool'
return 'more work to do', b
else :
b = 'not cool'
return 'more work to do', b
moreWorkToDo, b = choice()
print (b)
Another way is to set b as a global variable however it is usually not advised. Global variables can be accessed and modified from anywhere in the code, which can make it difficult to trace the source of a bug. Anyways here is the code:
a=1
def choice():
global b
if a==1 :
b = 'cool'
return 'more work to do'
else :
b = 'not cool'
return 'more work to do'
moreWorkToDo = choice()
print (b)