Datetime error in IDLE 3.6.0


#1

On the Date and Time exercise, this code seems to work just fine, but in IDLE for Python 3.6.0, I get an "invalid syntax" error on the last line of my code (below). It's almost as if "%s" is being read as invalid. Has anyone else experienced this? Is there, in fact, something wrong with my code or is this a more common issue?
from datetime import datetime
now = datetime.now()
print(now)

print(now.hour)
print(now.minute)
print(now.second)

print(%s/%s/%s) %(now.hour, now.minute, now.second)


#2

This should be a string. " ... ".


#3

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