help to code...
Matteo Boscolo
matteo.boscolo at boscolini.eu
Fri May 3 02:50:27 EDT 2013
The error is self expleined ..
print str(current_month) + '/' + str(current_day) + '/' +
str(current_year) +' *'+ *
this line have a + at the end,the interpreter need something to add ..
so remove it and it will work
regards,
Matteo
Il 02/05/2013 15:50, leonardo selmi ha scritto:
> dear python community,
>
> i wrote the following program:
>
> from datetime import datetime
> now = datetime.now()
> current_month = now.month
> current_day = now.day
> current_year = now.year
> current_hour = now.hour
> current_minute = now.minute
> current_second = now.second
> print str(current_month) + '/' + str(current_day) + '/' +
> str(current_year) +' '+
> print str(current_hour) + str(current_minute) + str(current_second)
>
> and i got this error:
> Traceback (most recent call last):
> File "runner.py", line 125, in compilecode
> File "python", line 9
> print str(current_month) + '/' + str(current_day) + '/' + str(current_year) +' '+
> ^
> SyntaxError: invalid syntax
>
> how can i write the last two lines correctly?
>
> thanks!
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130503/f6f4ec5c/attachment.html>
More information about the Python-list
mailing list