#This script converts to and from l33t speak

chars = { "A" : "4",
            "B" : "6",
            "E" : "3",
            "I" : "1",
            "L" : "1",
            "M" : "(V)",
            "N" : "(\)",
            "O" : "0",
            "S" : "5",
            "T" : "7",
            "V" : "\/",
           "W" : "`//"}

def to_l33t(words):
    words = words.upper()
    if all(x.isalpha() or x.isspace() or x == "." or x == "!" for x in words):
        for i in words:
            for k , v in chars.items():
                words = words.replace(k , v)
    else:
        for i in words:
            for k , v in chars.items():
                    words = words.replace(v , k)
    print(words.lower())



to_l33t("i am the best!")
to_l33t("Da pain!")
to_l33t("Eye need help!")
to_l33t("3Y3 (\)33d j00 t0 g37 d4 d0c70r")
to_l33t("1 n33d m4 p1llz!")