def znach(entry11, entry_11):
...
def znachenie():
...
btn=Button(frame2,text='Рассчитать',bg='white', font='Times 10',command=lambda: znach(entry11, entry_11))
my_dict = {}
with open('file.txt') as file:
for line in file.readlines():
name, value = line.split(':')
my_dict[name.strip()] = value.strip()
# code
with open('file.txt', 'w') as file:
file.writelines([f'{name} : {value}\n' for name, value in my_dict.items()])