I’m trying to execute the following code, but I’m getting
SyntaxError: invalid syntax
at the if statement. I’m sure it’s related to html as it worked previously without the preceding html; I’m having some difficulty understanding how to go in and out with html and Python as you can see.
class MainPage(webapp.RequestHandler):
def get(self):
#preceding ("""<html><head> tags...
</head>
<body>""")
self.response.out.write(today.strftime("""<html><body><p style='color:#3E3535'>%A, %d %B</p>""")
if mon <= 3:
var1 = "winter"
Thanks in advance for suggestions; the if/elifs are indented properly on page.
If this is your code, then you’re missing a close-paren to close out your last function call.
Change it to the following: