What is the most pythonic way to exclude elements of a list that start with a specific character?

Viewed 33076

I have a list of strings. I want to get a new list that excludes elements starting with '#' while preserving the order. What is the most pythonic way to this? (preferably not using a loop?)

2 Answers
Related