Q:

Find a specific word from a list in python

So I have a list like below-
list = [scaler-1, scaler-2, scaler-3, backend-1, backend-2, backend-3]

I want to create another list from it with the words which starts with 'backend'. How can i do that ? 
Please note the content of the list will change from system to system, I want my code to be dynamic, any help? 

A:

First off, do not use the name list for assignment to your objects, you'll shadow the builtin list type. 
Then, you can use a list comprehension with str.startswith in a filter:
new_lst = [x for x in lst if x.startswith('backend')]

