Print command giving syntax error python : <p>this is my code for a simple function as i'm a beginner</p>

<pre><code>def repeat(s, exclaim):
    result = s*3
    if exclaim:
        result = result + '!!!'
    return result
def main():
    print repeat('Yay', False)
    print repeat('Woo Hoo', True)

if __name__ == '__main__':
    main()
</code></pre>

<p>but when i run this code it shows an error on the line
 <code>print repeat('Yay', False)</code>
syntax error: invalid syntax
please help </p>
