If it's really just the syntax of the if/else chain you want to avoid, make a map between the classes and their corresponding lists, or even better just have Network have a dict of lists with classes as keys.