Python: How to write / read mutated vowels in a txt file?

Im on Windows 10 using Microsoft Visual Studio Python3

I have highly variable input data. In this data there can be any of these: ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöùúûüýþÿ (Mutated vowels) characters.

Now i want to write the data i have with these characters to a text file so it gets displayed as the correct character.

I've tried:

test_string = "äåæçèéêëìíîïðñòóô"
File = open("test.txt","a",encoding = "utf-8")
File.write(test_string.encode("utf-8")) #thought encoding might help

what i want to write in the file for example: é

what i get: \xc3\xa9 (Utf-8 literal)

I tried reading them from the file but it also gets displayed like this: \xc3\xa9 (Utf-8 literal)

If it isnt possible to do this then how do i convert these Mutated vowels into Utf-8 literals directly in my python code without writing to a file?

Working (as commented by Stack):

test_string = "äåæçèéêëìíîïðñòóô"
File = open("test.txt","w",encoding = "utf-8")