Refactoring: use list comprehensions
A list comprehension can create the list on one line, cutting out the clutter of declaring an empty list and then appending values.
See for reference: https://docs.sourcery.ai/Reference/Python/Default-Rules/list-comprehension/