I';我对Python 2.7的字典有一个bug

I';我对Python 2.7的字典有一个bug,python,dictionary,Python,Dictionary,我制作的字典用破折号(-)和两个数字替换字母。 在我的字典里,“t”=“-21”。当我从字典中调用“t”时,我得到“-21”。但是当我调用replace_all(text,dic)时,输出是“-2--5-63-5-63” 知道怎么回事吗 Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for

我制作的字典用破折号(-)和两个数字替换字母。 在我的字典里,“t”=“-21”。当我从字典中调用“t”时,我得到“-21”。但是当我调用
replace_all(text,dic)
时,输出是“-2--5-63-5-63” 知道怎么回事吗

Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ldic3 = {"a":"-02","b":"-03","c":"-04","d":"-05","e":"-06","f":"-07","g":"-08","h":"-09","i":"-10","j":"-11","k":"-12","l":"-13","m":"-14","n":"-15","o":"-16","p":"-17","q":"-18","r":"-19","s":"-20","t":"-21","u":"-22","v":"-23","w":"-24","x":"-25","y":"-26","z":"-27","A":"-28","B":"-29","C":"-30","D":"-31","E":"-32","F":"-33","G":"-34","H":"-35","I":"-36","J":"-37","K":"-38","L":"-39","M":"-40","N":"-41","O":"-42","P":"-43","Q":"-44","R":"-45","S":"-46","T":"-47","U":"-48","V":"-49","W":"-50","X":"-51","Y":"-52","Z":"-53","0":"-54","1":"-55","2":"-56","3":"-57","4":"-58","5":"-59","6":"-60","7":"-61","8":"-62","9":"-63"}
>>> def replace_all(text, dic):
    for i, j in dic.iteritems():
        text = text.replace(i, j)
    return text
#Example A
>>> var = "t"
>>> var2 = replace_all(var, ldic3)
>>> var2
'-2--5-63-5-63'
>>> ldic3["t"]
'-21'
#Example B
>>> var = "a"
>>> var2 = replace_all(var, ldic3)
>>> var2
'-02'
>>>
快速编辑:

这是为了让文本无法阅读,通过一次又一次地改变文本的内容。我不能把我的字符串转换成它自己的字典,而不破坏我的程序。这意味着一次可以更改整个段落中的字符

另外,“replace_all(text,dic)”的代码是我在网上找到的,我不确定它是如何工作的

这是我的节目:

from Tkinter import *
import time

def replace_all(text, dic):
    for i, j in dic.iteritems():
        text = text.replace(i, j)
    return text

passchar = {"a":"0","b":"1","c":"2","d":"3","e":"0","f":"1","g":"2","h":"3","i":"0","j":"1","k":"2","l":"3","m":"0","n":"1","o":"2","p":"3","q":"0","r":"1","s":"2","t":"3","u":"0","v":"1","w":"2","x":"3","y":"0","z":"1"," ":""}
ldic0 = {"a":"-82","b":"-93","c":"-11","d":"-91","e":"-88","f":"-27","g":"-01","h":"-17","i":"-72","j":"-90","k":"-99","l":"-42","m":"-21","n":"-12","o":"-81","p":"-28","q":"-73","r":"-96","s":"-92","t":"-87","u":"-86","v":"-62","w":"-00","x":"-31","y":"-69","z":"-77","A":"-02","B":"-09","C":"-43","D":"-10","E":"-46","F":"-78","G":"-13","H":"-24","I":"-35","J":"-46","K":"-05","L":"-83","M":"-96","N":"-70","O":"-98","P":"-48","Q":"-29","R":"-32","S":"-52","T":"-94","U":"-53","V":"-66","W":"-44","X":"-51","Y":"-71","Z":"-80","0":"-97","1":"-39","2":"-26","3":"-54","4":"-22","5":"-07","6":"-40","7":"-30","8":"-50","9":"-60"}
ldic1 = {"a":"-01","b":"-02","c":"-03","d":"-04","e":"-05","f":"-06","g":"-07","h":"-08","i":"-09","j":"-10","k":"-11","l":"-12","m":"-13","n":"-14","o":"-15","p":"-16","q":"-17","r":"-18","s":"-19","t":"-20","u":"-21","v":"-22","w":"-23","x":"-24","y":"-25","z":"-26","A":"-27","B":"-28","C":"-29","D":"-30","E":"-31","F":"-32","G":"-33","H":"-34","I":"-35","J":"-36","K":"-37","L":"-38","M":"-39","N":"-40","O":"-41","P":"-42","Q":"-43","R":"-44","S":"-45","T":"-46","U":"-47","V":"-48","W":"-49","X":"-50","y":"-51","Z":"-52","0":"-53","1":"-54","2":"-55","3":"-56","4":"-57","5":"-58","6":"-59","7":"-60","8":"-61","9":"-62"}
ldic2 = {"a":"-02","b":"-03","c":"-04","d":"-05","e":"-06","f":"-07","g":"-08","h":"-09","i":"-10","j":"-11","k":"-12","l":"-13","m":"-14","n":"-15","o":"-16","p":"-17","q":"-18","r":"-19","s":"-20","t":"-21","u":"-22","v":"-23","w":"-24","x":"-25","y":"-26","z":"-27","A":"-28","B":"-29","C":"-30","D":"-31","E":"-32","F":"-33","G":"-34","H":"-35","I":"-36","J":"-37","K":"-38","L":"-39","M":"-40","N":"-41","O":"-42","P":"-43","Q":"-44","R":"-45","S":"-46","T":"-47","U":"-48","V":"-49","W":"-50","X":"-51","Y":"-52","Z":"-53","0":"-54","1":"-55","2":"-56","3":"-57","4":"-58","5":"-59","6":"-60","7":"-61","8":"-62","9":"-63"}
ldic3 = {"a":"-02","b":"-03","c":"-04","d":"-05","e":"-06","f":"-07","g":"-08","h":"-09","i":"-10","j":"-11","k":"-12","l":"-13","m":"-14","n":"-15","o":"-16","p":"-17","q":"-18","r":"-19","s":"-20","t":"-21","u":"-22","v":"-23","w":"-24","x":"-25","y":"-26","z":"-27","A":"-28","B":"-29","C":"-30","D":"-31","E":"-32","F":"-33","G":"-34","H":"-35","I":"-36","J":"-37","K":"-38","L":"-39","M":"-40","N":"-41","O":"-42","P":"-43","Q":"-44","R":"-45","S":"-46","T":"-47","U":"-48","V":"-49","W":"-50","X":"-51","Y":"-52","Z":"-53","0":"-54","1":"-55","2":"-56","3":"-57","4":"-58","5":"-59","6":"-60","7":"-61","8":"-62","9":"-63"}
#ldic3 = {"a":"-62","b":"-61","c":"-60","d":"-59","e":"-58","f":"-57","g":"-56","h":"-55","i":"-54","j":"-53","k":"-52","l":"-51","m":"-50","n":"-49","o":"-48","p":"-47","q":"-46","r":"-45","s":"-44","t":"-43","u":"-42","v":"-41","w":"-40","x":"-39","y":"-38","z":"-37","A":"-36","B":"-35","C":"-34","D":"-33","E":"-32","F":"-31","G":"-30","H":"-29","I":"-28","J":"-27","K":"-26","L":"-25","M":"-24","N":"-23","O":"-22","P":"-21","Q":"-20","R":"-19","S":"-18","T":"-17","U":"-16","V":"-15","W":"-14","X":"-13","Y":"-12","Z":"-10","0":"-09","1":"-08","2":"-07","3":"-06","4","-05","5":"-04","6":"-03","7":"-02","8":"-01","9":"-00"}

ndic0 = {"0":"3","1":"4","2":"1","3":"7","4":"9","5":"8","6":"2","7":"5","8":"6","9":"0"}
ndic1 = {"0":"1","1":"4","2":"3","3":"5","4":"0","5":"8","6":"2","7":"6","8":"9","9":"7"}
ndic2 = {"0":"2","1":"9","2":"8","3":"4","4":"7","5":"3","6":"0","7":"1","8":"6","9":"5"}
ndic3 = {"0":"4","1":"2","2":"3","3":"9","4":"0","5":"1","6":"7","7":"8","8":"6","9":"5"}


class Application(Frame):

    def __init__(self, master):
        #Initialize the frame
        Frame.__init__(self,master)
        self.grid()
        self.create_widgets()

    def create_widgets(self):
        self.instruction = Label(self, text = "ENCRYPTION KEY:")
        self.instruction.grid(row = 0, column = 1, columnspan = 2, sticky = N) #sticky = direction W = West

        self.key = Entry(self) #Promps for user input
        self.key.grid(row = 1, column = 2, sticky = N)

    #SPACER1
        self.spacer1 = Label(self, text = " ")
        self.spacer1.grid(row = 2, column = 0, columnspan = 2, sticky = N)

#-------------
    #ENCRYPT BUTTON
        self.encrypt_button = Button(self, width = 18, height = 2, text ="ENCRYPT", command = self.textboxa1)
        self.encrypt_button.grid(row = 3, column = 0, sticky = N)

    #CLEAR BUTTON
        self.clear_button = Button(self, text ="CLEAR", width = 18, command = self.clearboxes)
        self.clear_button.grid(row = 3, column = 2, sticky = N)

    #DECRYPT BUTTON
        self.decrypt_button = Button(self, width = 18, height = 2, text ="DECRYPT",) #command = self.textboxa2
        self.decrypt_button.grid(row = 3, column = 3, sticky = N)

    #Top TextBox
        self.textbox1 = Text(self, width = 50, height = 15, wrap = WORD) # wrap = WORD CHAR or NONE
        self.textbox1.grid(row = 4, column = 0, columnspan = 4, sticky = N)

#-------------
    #SPACER2
        self.spacer2 = Label(self, text = " ")
        self.spacer2.grid(row = 5, column = 0, columnspan = 2, sticky = N)

    #Bottom TextBox
        self.textbox2 = Text(self, width = 50, height = 15, wrap = WORD)
        self.textbox2.grid(row = 6, column = 0, columnspan = 4, sticky = N)


    def textboxa1(self):
        keyvar = self.key.get()
        textvar = self.textbox1.get(0.0, END)
        keyvarl = len(keyvar)
        if keyvarl > 25 or keyvarl < 3:
            self.textbox2.delete(0.0, END)
            self.textbox2.insert(0.0, '"' + keyvar + '"' + " -ERROR PASSWORD MUST BE 3 - 25 CHARACTERS LONG")
        else:
            step = 0
            num = 0
            passcode = replace_all(keyvar, passchar)
            #self.textbox2.delete(0.0, END)
            #self.textbox2.insert(0.0, "start")
            for i in range(keyvarl):
                char = list(passcode)
                dig = passcode[num]
                self.textbox2.insert(0.0, "")
                if dig == "0":
                    if step == 0:
                        step = 1
                        textvar2 = replace_all(textvar, ldic0)
                        #time.sleep(0.5)
                        #self.textbox2.insert(0.0, "0")
                    else:
                        textvar2 = replace_all(textvar2, ndic0)
                        #time.sleep(0.5)
                        #self.textbox2.insert(0.0, "0")
                elif dig == "1":
                    if step == 0:
                        step = 1
                        textvar2 = replace_all(textvar, ldic1)
                        #time.sleep(0.5)
                        #self.textbox2.insert(0.0, "1")
                    else:
                        textvar2 = replace_all(textvar2, ndic1)
                        #time.sleep(0.5)
                        #self.textbox2.insert(0.0, "1")
                elif dig == "2":
                    if step == 0:
                        step = 1
                        textvar2 = replace_all(textvar, ldic2)
                        #time.sleep(0.5)
                        #self.textbox2.insert(0.0, "2")
                    else:
                        textvar2 = replace_all(textvar2, ndic2)
                        #time.sleep(0.5)
                        #self.textbox2.insert(0.0, "2")
                else:
                    if step == 0:
                        step = 1
                        textvar2 = replace_all(textvar, ldic3)
                        #time.sleep(0.5)
                        #self.textbox2.insert(0.0, "3")
                    else:
                        textvar2 = replace_all(textvar2, ndic3)
                        #time.sleep(0.5)
                        #self.textbox2.insert(0.0, "3")
                keyvar2 = keyvarl - 1
                if i == keyvar2:
                    #self.textbox2.delete(0.0, END)
                    self.textbox2.insert(0.0, textvar2 + textvar)
                else:
                    #self.textbox2.delete(0.0, END)
                    self.textbox2.insert(0.0, textvar2 + textvar)
                    self.textbox2.insert(0.0, keyvar2)
                    self.textbox2.insert(0.0, " of ")
                    self.textbox2.insert(0.0, num)
                    self.textbox2.insert(0.0, "Step: ")
                   # self.textbox2.insert(0.0, textvar2 + textvar)
                num = num + 1



   # def textboxa2(self):
       # input1 = self.key.get()
       # input2 = self.textbox1.get(0.0, END)

       # self.textbox2.delete(0.0, END)
       # self.textbox2.insert(0.0, input1 + input2)

    def clearboxes(self):
        self.textbox1.delete(0.0, END)
        self.textbox2.delete(0.0, END)









root = Tk()
root.title("FirePie Demo - Message Encryptor!")
root.geometry("403x630")
app = Application(root)

root.mainloop()
从Tkinter导入*
导入时间
def replace_all(文本,驾驶员信息中心):
对于dic.iteritems()中的i,j:
text=text.替换(i,j)
返回文本
passchar={“a”:“0”,“b”:“1”,“c”:“2”,“d”:“3”,“e”:“0”,“f”:“1”,“g”:“2”,“h”:“3”,“i”:“0”,“j”:“1”,“k”:“2”,“l”:“3”,“m”:“0”,“n”:“1”,“o”:“2”,“p”:“3”,“q”:“0”,“r”:“1”,“s”:“2”,“t”:“3”,“u”:“0”,“v”:“1”,“w”:“2”,“x”:“3”,“y”:“0”,“z”:“1”,“s”:”
ldic0={“a”:“-82”,“b”:“-93”,“c”:“-11”,“d”:“-91”,“e”:“-88”,“f”:“-27”,“g”:“-01”,“h”:“-17”,“i”:“-72”,“j”:“-90”,“k”:“-99”,“l”:“-42”,“m”:“-21”,“n”:“-12”,“o”:“-81”,“p”:“-28”,“q”:“-73”,“r”:“-96”,“s”:“-92”,“t”:“-87”,“u”:“-86”,“v”:“-62”,“w”:“-00”,“x”:“-31”,“y”:“-69”,“z”:“-77”,“a”:“-02”,“b”:“-12”,“c”:“-73”,“d”:46”,“e”:“-13”:,“I”:“-35”,“J”:“-46”,“K”:“-05”,“L”:“-83”,“M”:“-96”,“N”:“-70”,“O”:“-98”,“P”:“-48”,“Q”:“-29”,“R”:“-32”,“S”:“-52”,“T”:“-94”,“U”:“-53”,“V”:“-66”,“W”:“-44”,“X”:“-51”,“Y”:“-71”,“Z”:“-80”,“0”:“-97”,“1”:“-39”,“2”:“-26”,“3”:“-54”,“4”:“-22”,“5”:07”,“6”:“-40”,“7”:-30”,“8”:“-50”,“9”:60”}
ldic1={“a”:“-01”,“b”:“-02”,“c”:“-03”,“d”:“-04”,“e”:“-05”,“f”:“-06”,“g”:“-07”,“h”:“-08”,“i”:“-09”,“j”:“-10”,“k”:“-11”,“l”:“-12”,“m”:“-13”,“n”:“-14”,“o”:“-15”,“p”:“-16”,“q”:“-17”,“r”:“-18”,“s”:“-19”,“t”:“-20”,“u”:“-21”,“v”:“-22”,“w”:-23”,“x”:“-24”,“y”:“-25”,“z”:“-26”,“a”:“-27”,“b”:“-28”,“c”:“-29”,“d”:”和“e”:“-33”:I:“-35”,“J:”-36”,“K:“-37”,“L:“-38”,“M:”-39”,“N:“-40”,“O:”-41”,“P:“-42”,“Q:”-43”,“R:“-44”,“S:”-45”,“T:“-46”,“U:”-47”,“V:“-48”,“W:”-49”,“X:“-50”,“y:”-51”,“Z:“-52”,“0:”-53”,“1:“-54”,“2:“-55”,“3:”-56”,“4:“-57”,“5:”-58”,“6:”-59”,“7:“-60”,“8:”-61”,“9:“-62”}
ldic2={“a”:“-02”,“b”:“-03”,“c”:“-04”,“d”:“-05”,“e”:“-06”,“f”:“-07”,“g”:“-08”,“h”:“-09”,“i”:“-10”,“j”:“-11”,“k”:“-12”,“l”:“-13”,“m”:“-14”,“n”:“-15”,“o”:“-16”,“p”:“-17”,“q”:“-18”,“r”:“-19”,“s”:“-20”,“t”:“-21”,“u”:“-22”,“v”:“-23”,“w”:“-24”,“x”:“-25”,“y”:“-26”,“z”:“-27”,“a”:“-28”,“b”:“-29”,“c”:“-30”,“d”:”和“e”:“-33”:我“:”-36“,“J“:”-37“,”K“:”-38“,”L“:”-39“,”M“:”-40“,”N“:”-41“,”O“:”-42“,”P“:”-43“,”Q“:”-44“,”R“:”-45“,”S“,”46“,”T“,”47“,”U“,”48“,”V“:”,”49“,”W“,”50“,”X“:”,”51“,”Y“,”52“,”Z“,”53“,”0“:”,”54“,”1“,”55“,”2“,”56“,”3“,”57“,”4“
ldic3={“a”:“-02”,“b”:“-03”,“c”:“-04”,“d”:“-05”,“e”:“-06”,“f”:“-07”,“g”:“-08”,“h”:“-09”,“i”:“-10”,“j”:“-11”,“k”:“-12”,“l”:“-13”,“m”:“-14”,“n”:“-15”,“o”:“-16”,“p”:“-17”,“q”:“-18”,“r”:“-19”,“s”:“-20”,“t”:“-21”,“u”:“-22”,“v”:“-23”,“w”:“-24”,“x”:“-25”,“y”:“-26”,“z”:“-27”,“a”:“-28”,“b”:“-29”,“c”:“-30”,“d”:”和“e”:“-33”:我“:”-36“,“J“:”-37“,”K“:”-38“,”L“:”-39“,”M“:”-40“,”N“:”-41“,”O“:”-42“,”P“:”-43“,”Q“:”-44“,”R“:”-45“,”S“,”46“,”T“,”47“,”U“,”48“,”V“:”,”49“,”W“,”50“,”X“:”,”51“,”Y“,”52“,”Z“,”53“,”0“:”,”54“,”1“,”55“,”2“,”56“,”3“,”57“,”4“
#ldic3={“a”:“-62”,“b”:“-61”,“c”:“-60”,“d”:“-59”,“e”:“-58”,“f”:“-57”,“g”:“-56”,“h”:“-55”,“i”:“-54”,“j”:“-53”,“k”:“-52”,“l”:“-51”,“m”:“-50”,“n”:“-49”,“o”:“-48”,“p”:“-47”,“q”:“-46”,“r”:“-45”,“s”:“-44”,“t”:“-43”,“u”:“-42”,“v”:“-41”,“w”:“-40”,“x”:“-39”,“y”:“-38”,“z”:“-37”,“a”:“-36”,“b”:“-35”,“c”:“-34”,“e”:“-31”:“,”I“:”-28“,”J“:”-27“,”K“:”-26“,”L“:”-25“,”M“:”-24“,”N“,”23“,”O“:”-22“,”P“,”Q“,”20“,”R“,”19“,”S“,”18“,”T“,”17“,”U“,”16“,”V“:”,”15“,”W“,”14“,”X“,”13“,”Y“,”12“,”Z“,”10“,”0“,”09“,”1“,”08“,”2“,”07“,”3“,”06“,”4“,”05“,”5“,”04“,”
ndic0={“0”:“3”,“1”:“4”,“2”:“1”,“3”:“7”,“4”:“9”,“5”:“8”,“6”:“2”,“7”:“5”,“8”:“6”,“9”:“0”}
ndic1={“0”:“1”、“1”:“4”、“2”:“3”、“3”:“5”、“4”:“0”、“5”:“8”、“6”:“2”、“7”:“6”、“8”:“9”、“9”:“7”}
ndic2={“0”:“2”,“1”:“9”,“2”:“8”,“3”:“4”,“4”:“7”,“5”:“3”,“6”:“0”,“7”:“1”,“8”:“6”,“9”:“5”}
ndic3={“0”:“4”,“1”:“2”,“2”:“3”,“3”:“9”,“4”:“0”,“5”:“1”,“6”:“7”,“7”:“8”,“8”:“6”,“9”:“5”}
课程申请(框架):
定义初始(自我,主):
#初始化帧
帧。\uuuu初始化(自,主)
self.grid()
self.create_widgets()
def创建_小部件(自):
self.instruction=标签(self,text=“加密密钥:”)
self.instruction.grid(行=0,列=1,列span=2,粘性=N)#粘性=方向W=西
self.key=输入(self)#提示用户输入
self.key.grid(行=1,列=2,粘性=N)
#垫片1
self.spacer1=标签(self,text=”“)
self.spacer1.grid(行=2,列=0,列span=2,粘性=N)
#-------------
#加密按钮
self.encrypt_button=按钮(self,宽度=18,高度=2,text=“encrypt”,command=self.textboxa1)
self.encrypt_button.grid(行=3,列=0,粘性=N)
#清除按钮
self.clear\u按钮=按钮(self,text=“clear”,width=18,command=self.clearboxs)
self.clear_button.grid(行=3,列=2,粘性=N)
#解密按钮
self.decrypt_按钮=按钮(self,宽度=18,高度=2,text=“decrypt”,)#命令=self.textboxa2
self.decrypt_button.grid(行=3,列=3,粘性=N)
#顶部文本框
self.textbox1=Text(self,宽度=50,高度=15,wrap=WORD)#wrap=WORD字符或无
self.textbox1.grid(行=4,列=0,列span=4,条
def replace_all(text, dic):
    return ''.join([dic[i] for i in text])
def replace_all(text, dic):
    for i, j in dic.iteritems():
        text2 = text.replace(i, j)
        if text2 != text:
            print(i)
            text = text2
    return text
t
1
5
9
>>> def replace_all(text, dic):
    print text
    for i, j in dic.iteritems():
        text = text.replace(i, j)
        print "i: %s, j: %s, text: %s" % (i,j,text)
    return text

>>> var2 = replace_all(var, ldic3)
t
i: 0, j: -54, text: t
i: 2, j: -56, text: t
i: 4, j: -58, text: t
i: 6, j: -60, text: t
i: 8, j: -62, text: t
i: B, j: -29, text: t
i: D, j: -31, text: t
i: F, j: -33, text: t
i: H, j: -35, text: t
i: J, j: -37, text: t
i: L, j: -39, text: t
i: N, j: -41, text: t
i: P, j: -43, text: t
i: R, j: -45, text: t
i: T, j: -47, text: t
i: V, j: -49, text: t
i: X, j: -51, text: t
i: Z, j: -53, text: t
i: b, j: -03, text: t
i: d, j: -05, text: t
i: f, j: -07, text: t
i: h, j: -09, text: t
i: j, j: -11, text: t
i: l, j: -13, text: t
i: n, j: -15, text: t
i: p, j: -17, text: t
i: r, j: -19, text: t
i: t, j: -21, text: -21
i: v, j: -23, text: -21
i: x, j: -25, text: -21
i: z, j: -27, text: -21
i: 1, j: -55, text: -2-55
i: 3, j: -57, text: -2-55
i: 5, j: -59, text: -2--59-59
i: 7, j: -61, text: -2--59-59
i: 9, j: -63, text: -2--5-63-5-63
i: A, j: -28, text: -2--5-63-5-63
i: C, j: -30, text: -2--5-63-5-63
i: E, j: -32, text: -2--5-63-5-63
i: G, j: -34, text: -2--5-63-5-63
i: I, j: -36, text: -2--5-63-5-63
i: K, j: -38, text: -2--5-63-5-63
i: M, j: -40, text: -2--5-63-5-63
i: O, j: -42, text: -2--5-63-5-63
i: Q, j: -44, text: -2--5-63-5-63
i: S, j: -46, text: -2--5-63-5-63
i: U, j: -48, text: -2--5-63-5-63
i: W, j: -50, text: -2--5-63-5-63
i: Y, j: -52, text: -2--5-63-5-63
i: a, j: -02, text: -2--5-63-5-63
i: c, j: -04, text: -2--5-63-5-63
i: e, j: -06, text: -2--5-63-5-63
i: g, j: -08, text: -2--5-63-5-63
i: i, j: -10, text: -2--5-63-5-63
i: k, j: -12, text: -2--5-63-5-63
i: m, j: -14, text: -2--5-63-5-63
i: o, j: -16, text: -2--5-63-5-63
i: q, j: -18, text: -2--5-63-5-63
i: s, j: -20, text: -2--5-63-5-63
i: u, j: -22, text: -2--5-63-5-63
i: w, j: -24, text: -2--5-63-5-63
i: y, j: -26, text: -2--5-63-5-63
result = ''.join(map(ldic3.get, var))