There are some locations that I visit each one according to some constraints. For example, I visit school every day at the morning and noon and I don't visit school on weekends. Another one, I've been at the mall on morning time so I probably won't be there again today and also in the next few days (I don't work at the mall).
My question is if there is a good way to choose the right location from a data set looks like:
location | types
MIT | 'school'
western union | 'accounting', 'finance'
Walmart | 'store', 'home_goods_store'
And I know the constraints of each place, it depends on:
the time of the day is it a working day how long I've been there the frequency of visiting have I been there today? this week? this month?
and for each place, there is a different combination of values of constraints.
Right now I'm doing it with many dictionaries for each constraint but it looks pretty bad with so many if statements
Is there a better way to do it? Working with Python
TIA
Aucun commentaire:
Enregistrer un commentaire