Need help on 5/6!


from datetime import datetime
now =

print '%s:%s:%s' % (now.hour, now.minute, now.second)
print 13:22:05

File "python", line 5
print 13:22:05
SyntaxError: invalid syntax



If you are looking to store a piece of text that isn't Python code, then you might want to use a string literal. You can create a string literal by putting quotes around said text.

If that part is supposed to be Python code, then you'll have to explain what you want it to do. In general, explain what you expect and what happens instead, otherwise it becomes a lot more difficult to figure out what you want to know.


you don't need line 5 in this code