That's because the variable poem
in the module you are importing from (poetry_generator
) has no value associated with it. You are assigning a print function to the poem
variable. And not the actual string itself.
Assigning a print function to a variable does not save the string itself. This is what I mean:
>>> poem = print("Hi")
Hi
>>> poem
>>>
You need to be doing
poem = "Hi"
Only then can you expect poetry_generator.poem
to work in the other module.
Using doc strings to create output strings may not be a good choice. Create your poem
variable like this instead:
poem = "See, see the , {} , sky\nmarvel at its big , {} , depths.\nTell me, , {} ,do you\nWonder why the , {} , ignores you?\nWhy its foobly stare\nmakes you feel , {} ,. \nI can tell you, it is\nWorried by your , {} , facial growth\nThat looks like\nA , {} ,.\nWhat's more, it knows\nYour , {} , potting shed\nSmells of , {} ,.\nEverything under the big , {} , sky\nAsks why, why do you even bother?\nYou only charm , {} ,s.\n".format(momdescription, shirt_color, friends_name, uglyAnimal, wakeup, madeUpWord, fridge, rude, smallgreen, momdescription, smell)