Well, I'm starting to laugh a little with my Python, but I think I can answer this question. This may not be the best answer.
If you plan to run many polls at the same time, you can implement a dictionary containing multiple instances of a custom class, such as Poll. Here you can find the solution:
class PollVotes(object): def __init__(self): self.votes = [] self.stoptime = "some date/time"
Of course, you will need to edit the poll class in accordance with your needs, that is, allow several values ββwhen voting, record who votes what (if you want it), etc.
As for checking the completion of the survey, you can edit the poll class to have a stop time, and have a function that returns True / False, whether this time has passed or not. Perhaps look at the docs for the datetime module ...?
Anyway, hope this helps.
source share