from datetime import datetime as d
n=d.now()
t="morning." if n.hour()<12 else(t="afternoon." if n.hour()<18 else t="evening.")
print str(n.hour)+" in the "+str(t)
ZnJvbSBkYXRldGltZSBpbXBvcnQgZGF0ZXRpbWUgYXMgZApuPWQubm93KCkKdD0ibW9ybmluZy4iIGlmIG4uaG91cigpPDEyIGVsc2UodD0iYWZ0ZXJub29uLiIgaWYgbi5ob3VyKCk8MTggZWxzZSB0PSJldmVuaW5nLiIpCnByaW50IHN0cihuLmhvdXIpKyIgaW4gdGhlICIrc3RyKHQp
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/py_compile.py", line 117, in compile
raise py_exc
py_compile.PyCompileError: SyntaxError: ('invalid syntax', ('prog.py', 3, 35, 't="morning." if n.hour()<12 else(t="afternoon." if n.hour()<18 else t="evening.")\n'))