I'm basically trying to create something of an mad libs generator. When it runs through all the random variables, and I try to get it to save as a variable, and then print that variable I get "none"
I'm a novice so I apologize if this is painfully dumb. Link to colab notebook where you can see it: https://colab.research.google.com/drive/1Eh0-ACUJOduxjRbsql7ut_VgZEE4PBWW?usp=sharing
This is the code
import random
#Word Buckets
list = ("Todd", "Jill","Mary")
secondlist = ("hot","cold","run" )
thirdlist = ('pizza','pasta',"wine" )
#Create Define random choices
def def1 ():
d=random.choice(list)
a=random.choice(secondlist)
r=random.choice(thirdlist)
c=random.choice(list)
print(d,a, (r+"'s"),c)
def def2 ():
d=random.choice(list)
a=random.choice(secondlist)
f=random.choice(thirdlist)
fv=random.choice(thirdlist)
print(fv, "Because of",(d+"'s"),f)
titletype = (def1, def2)
#random.choice(titletype)()
message=random.choice(titletype)()
print(message)
And that will return None