Data Science, Simulation, Deep Dives, Hands On Tutorials, Product Analytics.
initialise all the variables. tmp_gen_tests = [] last_test_date = None last_lesson_date = None Now, we need to iterate by event and check the criteria. for rec in user_events: pass Let's go through all our criteria, starting from the initial test. In this case, last_test_date will be equal to None.