Use Python list comprehensions and literals when possible

Using constant .append() instead of creating the raw literal can be slower and less clear.