Python variables to JS

4 hours ago 3
ARTICLE AD BOX

I am trying to make a program that tells you what period you are in, and I am using JS, but for the time I’m using Python so I need to communicate the variables between the 2 languages. Everything I have tried doesn’t work. I have tried:

from datetime import datetime time = datetime.now() if time > 08.40.00: period = 1 elif time < 08.40.00 and time > 09.10.00 period = 2

I need to get the period variable to communicate with JS but I do not know how.

Read Entire Article