How to print function on if statement?
<p>How do I print the function 'play' in the if statement on line 5?</p>

<pre><code>print("Deal 'Em\nby Imago Games")
print("1. Play\n2. Credits")
select = input()
if select == 1:
    def play()
elif select == 1:
    print("Bye")
def play():
    print("Welcome to Deal 'Em\nLet me teach you the basics!")
</code></pre>

<p>You can put either just <code>play()</code> on line 5 (remove the <code>def</code>) or change the <code>play</code> function to return the string instead of printing it. <code>def</code> is only used when you define the function, not when you call it.</p>

python