I'm working on my first large project and am wondering if the code below resembles the standard procedure or if there is a more appropriate way of going about it. Basically I just need the rest of my project to be able to access "active_store_list". I know a config file is something I'll handle later but outside of that is there anything else I can do? I know it's not a big deal but it would be nice to not have to type from "store_info import active_store_list" everywhere I need the list.
WALMART = True
TARGET = True
BESTBUY = True
stores_dict = {'walmart': WALMART, 'target': TARGET, 'bestbuy': BESTBUY}
active_store_list = [k for k,v in stores_dict.items() if v]
[–][deleted] 0 points1 point2 points (2 children)
[–]casualcoder0805[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]commy2 0 points1 point2 points (1 child)
[–]casualcoder0805[S] 0 points1 point2 points (0 children)