A Korean (Language) Dictionary Function : User enters a word in korean and the program translates (defines) it in english. 
  
  What improvements can I make? 
  
  Extra : What other challenges would you recommend that incorporates both JSON and python?


KoreanDictionary.py

import json
from difflib import get_close_matches

korean_data = json.load(open("korean_vocabulary.json"))

def my_translator(word):
    if word in korean_data.keys():
        return korean_data[word]
    elif len(get_close_matches(word,korean_data.keys(),n=1,cutoff=.69)) &gt; 0:
        word = get_close_matches(word,korean_data.keys(),n=1,cutoff=.69)[0]
        return korean_data[word]
    else:
        return "Word does not exist."



if __name__ == '__main__':

    user_input = input("Define:")
    definition = str(my_translator(user_input)).replace('[','').replace(']','').replace("'",'')
    print(user_input + ": " + definition)


korean_vocabulary.json

{"안녕하세요": ["hello"],"죽어버려": ["GO DIE"],"상황": ["situation"],"어려워": ["hard; difficult"],
    "모르겠다": ["I don't know."],"조건": ["condition"],"정규직 직업": ["full-time job"],
    "탈락": ["eliminate; out"], "눈치": ["quick to catch; tactfulness"],"슬픈": ["sad"],
    "복잡한": ["complicated"],"완전": ["completely"],"반대": ["opposite"],"대박": ["jackpot; awesome"],
    "어꺠": ["shoulders"],"얼굴": ["face"]}
if word in korean_data.keys():
    return korean_data[word]


This is better written as:

trans = korean_data.get(word)
if trans:
    return trans


This:

elif len(get_close_matches(word,korean_data.keys(),n=1,cutoff=.69)) &gt; 0:
    word = get_close_matches(word,korean_data.keys(),n=1,cutoff=.69)[0]
    return korean_data[word]


calls for a few changes. Firstly, you don't need an elif, simply an if - because the previous block returned. Also, you should avoid re-issuing that entire get_close_matches call, and instead write a temporary variable:

words = get_close_matches(word,korean_data.keys(),n=1,cutoff=.69)
if words:
    return korean_data[words[0]]


This:

return "Word does not exist."


is not really good practice. It's "in-band error information", i.e. you're mixing valid data with an error message. Instead, you should be raise-ing an exception, catching it in your calling code, and outputting an error message there.


  What other challenges would you recommend that incorporates both JSON and python?


Download or scrape a real Korean-English dictionary dataset, either incorporating it into your application or setting up a REST client to contact a translation server somewhere. If local, save it as a format more efficient than JSON - perhaps compressed pickle, or SQLite. There are many ways to store a local database, and each has its advantages and disadvantages, but that's a topic for another question.