Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #44633
| From | leonardo selmi <l.selmi@icloud.com> |
|---|---|
| Subject | help to code... |
| Date | 2013-05-02 15:50 +0200 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1245.1367506274.3114.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
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!
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
help to code... leonardo selmi <l.selmi@icloud.com> - 2013-05-02 15:50 +0200
csiph-web