Repl Search: The best search engine around
BobTheTomatoPie (1000)

Very Beta

I will be adding a couple of entries per day, just to keep the site fresh

Tell me searches to add

Just comment: the search name, and the info

Some of you guys have entries!

If you type in your user you might have an entry.

Enjoy

-BobTheTomatoPie

Thanks

Thanks to @VulcanWM and @bookie0 for help adding searches

You are viewing a single comment. View All
SixBeeps (2339)

@BobTheTomatoPie Sure

  • Make a file called something.json and put this in it:
{
  "A Word": "This is a definition for something.",
  "Another Word": "Wow! There is more than just one term."
}
  • import json
  • Load the .json file into a string:
jsonFile = open('something.json', 'r')
jsonString = jsonFile.read()
jsonFile.close()
  • Parse the JSON dictionary from a string into a variable:
dict = json.loads(jsonString)

You can then access terms and their definitions like a normal dictionary:

print(dict['A Word'])