Pretty Time


#1



On Pretty time, my code is not passing.

https://www.codecademy.com/courses/python-beginner-en-zFPOx/0/5?curriculum_id=4f89dab3d788890003000096#


My code says there is an error with my hh:mm:ss format

File "python", line 3
print 09:16:45
^
SyntaxError: invalid token


It should save and submit my answer. Here is my code:


from datetime import datetime
now = datetime.now()
print 09:16:45
print '%s:%s:%s' % (now.hour, now.minute, now.second)


#2

this line:

print 09:16:45

is invaild syntax, remove it


#3

Thank you for your help.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.