Use list comprehension for better py3 compatibility