Here is my code :

```
filenames = []
data = []
found = False

axconfig = open('axcfgpasww.dat', "r")
dictionnary = open("hello.txt", "r")

output_value = "bonjour"
for line in axconfig:
    for word in dictionnary:
        element = word.split("=")[0]
        if element in axconfig:
            # old_value = line.split("=")
            # data.append(line.replace(old_value, output_value+'\n'))

            # found = True
        # else:
            # data.append(line)

            print(element)

if not found:
    print('No match found')

# Create a new file, from data array
with open("olivier.txt", 'w') as outfile:
    for line in data:
        outfile.write(line)

```

The dynamic value is "element". 

I have a .txt file, that have keywords and want to look "element" with the values inside the .txt file.

But my code doesn't work..
It only adds in olivier.txt the first line of axcfgpasww.dat..
And is also returning "No match found"

Thanks guys !

edit :

> 
> axcfgpasww.dat
> 
> 
> 

```
T72_BANK_IDENTIFIER_CODE_3=SOAPFR22
T72_ISSUER_COUNTRY_CODE_3=FR
T72_MERCHANT_ID_3=
T72_VAS_SCHEME_IDENTIFIER_3=

```

> 
> hello.txt
> 
> 
> 

```
T72_VAS_SERVICE_IDENTIFIER_7=
T72_VAS_SCHEME_IDENTIFIER_3=

```