I have an issue with one of the early python lessons: Date and Time. I was taught to use Modulo for formatting a string related to Date and Time. The following is what I was taught:
print '%s/%s/%s' % (now.hour, now.minute, now.second)
Unfortunately, when I attempt to use this code on Python, it doesn’t work. Below is the code I input and the proceeding message from Python.
print ‘%s/%s/%s’ % (now.hour, now.minute, now.second)
SyntaxError: invalid syntax
Can someone please explain why it doesn’t work for me?
Thank you in advance.