import json
def leet(string):
#Reading leet dictionary
try:
with open("leet.json", "r") as leet_dictionary:
leet_book = json.load(leet_dictionary)
#If file not found
except FileNotFoundError:
print("leet dictionary not found !")
#Split string
temporarily = []
temporarily[:] = string
#Encode
for index, data in enumerate(temporarily):
for key, value in leet_book.items():
if key in data:
temporarily[index]=data.replace(key, leet_book[key])
#Join again
result_string = "".join(temporarily)
return result_string
string = input("Enter Raw String: ")
output = leet(string)
#Result
print(f"{string} | {output}")