Last active
August 29, 2015 13:56
-
-
Save jackdh/8940057 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
with open('questions.json') as f: | |
questions = json.load(f) | |
question_number= questions[0] # 0 For getting first question answer set | |
print(question_number["question"]) | |
#Prints what is 2+2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Text file,
[
{
"question": "what is 2+2",
"answer": "4",
"fake1": "5"
},
{
"question": "what is the meaning of life?",
"answer": "pizza",
"fake1": "42"
}
]