I have a list of `strings` and I would like to check if in this string I have a specific `word`, if yes I copy it to a list. This word need to be before a `= {`

For example if I have, as `strings`:

```
TOTO_TEST = {0x68, 0x65, 0x6c, 0x6c, 0x6f}

```

And as `word`:

```
TOTO

```

I already tried this:

```
if fnmatch.filter(strings, word + '* = {')

```

This will not find my `string`. It will only works if the `string` is :

```
TEST_TOTO = {0x68, 0x65, 0x6c, 0x6c, 0x6f}

```

Can you tell me what is wrong with my *fnmatch* please?
BTW I'm really open for another way to do it!