def BackSpace(buyt_array):
global Temp, index, Test, Output_string, label0, line0, title0, circle0, kb
buyt_array = Output_string.encode()
buyt_array = buyt_array[ : -1]
Output_string = (Output_string if isinstance(Output_string, (int, float)) else 0) + (buyt_array.decode())
The last line produces an error.
to me the last line should be Output_string = buyt_array.decode()