python 英语词典
Module used:
使用的模块:
In this script, we will use the JSON module because we will use a JSON file and loading requires the JSON module. We will use difflib module.
在此脚本中,我们将使用JSON模块,因为我们将使用JSON文件并且加载需要JSON模块。 我们将使用difflib模块。
What is JSON?
什么是JSON?
JSON (JavaScript Object Notation) is an inbuilt python library which provides us various functions to read and write the file with .json extension and it usually deals with the file which looks like a python dictionary.
JSON (JavaScript对象表示法)是一个内置的python库,它为我们提供了多种功能来读写具有.json扩展名的文件,并且通常处理类似于python字典的文件。
What is difflib?
difflib是什么?
A python inbuilt module that provides us with various functions to compare various sequences in python, from this module we will use the get_close_matches() function which gives us the list of words which are very close to the user's word.
一个python内置模块,为我们提供了各种功能来比较python中的各种序列,在该模块中,我们将使用get_close_matches()函数,该函数为我们提供了与用户单词非常接近的单词列表。
Note