Hi Team, I am learning puthon and trying the following code.
But getting the following error. Please help me in knowing the code in better way. OS Linux Python version 2.7.13 def demo(s, exclaim): # """ # Returns the string 's' repeated 3 times. # If exclaim is true, add exclamation marks. result = s + s + s if exclaim: result = result + '!!!' return result def main(): print demo('Yay', False) ## YayYayYay print demo('Woo Hoo', True) ## Woo HooWoo HooWoo Hoo!!! Error: ./python2.py: line 1: syntax error near unexpected token `(' ./python2.py: line 1: `def demo(s,exclaim): Regards Sonia _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor