Syntax error for simple script

Steve D'Aprano steve+python at pearwood.info
Mon Jun 26 11:42:22 EDT 2017


On Tue, 27 Jun 2017 01:16 am, Ben S. wrote:

> print mm + "/" + dd + "/" + yyyy + " " + hour + ":" + mi + ":" + ss
> ^
> SyntaxError: Missing parentheses in call to 'print'
> 
> Whats wrong?

Did you read the error message?

    Missing parentheses in call to 'print'

Is the message not clear enough? The call to print requires parentheses (round
brackets), like all other functions. 

print(mm + "/" + dd + "/" + yyyy + " " + hour + ":" + mi + ":" + ss)


If the error message isn't clear enough, what can we do to make it more clear?




-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list