This is my code:
from getch import getch
from replit import clear
test1 = []
code = {
"!" : "!","@" : "@","?" : "?","." : ".","," : ","," " : " ","#" : "#","$" : "$","%" : "%","^" : "^","&" : "&","`" : "`","~" : "~","_" : "_","=" : "=","\\" : "\\","|" : "|","[" : "[","{" : "{","]" : "]","}" : "}",";" : ";",":" : ":","'" : "'",'"' : '"',"<" : "<",">" : ">","/" : "/","a" : "7","b" : "8","c" : "9","d" : "4","e" : "5","f" : "6","g" : "1","h" : "2","i" : "3","j" : "÷","k" : "*","l" : "-","m" : "+","n" : "(7)","o" : "(8)","p" : "(9)","q" : "(4)","r" : "(5)","s" : "(6)","t" : "(1)","u" : "(2)","v" : "(3)","w" : "(÷)","x" : "(*)","y" : "(-)","z" : "(+)","A" : "7","B" : "8","C" : "9","D" : "4","E" : "5","F" : "6","G" : "1","H" : "2","I" : "3","J" : "÷","K" : "*","L" : "-","M" : "+","N" : "(7)","O" : "(8)","P" : "(9)","Q" : "(4)","R" : "(5)","S" : "(6)","T" : "(1)","U" : "(2)","V" : "(3)","W" : "(÷)","X" : "(*)","Y" : "(-)","Z" : "(+)"
}
while True:
test = getch()
if (test = "\x7f"):
test1=test1[:-1]
else:
test1.append(test)
clear()
print("".join(str(code[c]) for c in test1) )
on line 9 it tells me I have a syntax error even tho I typed it correctly, can you guys help me solve this and if it is solved does it work as intended
(this is coded in repl.it)