Create a Python program to filter a list of strings and return only the strings that contain a given substring.
The list ["cat", "dog", "elephant", "rabbit", "duck"] and the substring "ra".
def filter_list(lst, sub):
 filtered = [s for s in lst if sub in s]
 return filtered

lst = ["cat", "dog", "elephant", "rabbit", "duck"]
sub = "ra"

result = filter_list(lst, sub)
print(result)

# Output: ['rabbit']