You can also use regular expressions to parse the values:
import re
mylist = [
{'name': 'Test01' },
{'name': 'Tests04' }
]
regex = re.compile(r'^\w{4}\d{2}$')
mylist = [{k:v} for _ in mylist for k,v in _.items() if regex.match(v)]
# Or, maybe this is more clear?
# mylist = [item for item in mylist if regex.match(list(item.values())[0])]
print(mylist)
This returns:
[{'name': 'Test01'}]
This says to look for four "word" characters then two digits between the start and end of the value of each object. Anything that doesn't match this pattern is filtered out. Check out the definition of \w to make sure that you and the authors of re agree on what word chars are.
And, as @cobra pointed out, using dict as a variable name (particularly for a list) is not best practice.