Does it matter if I indent the print statement? It seems like I get the same thing whether I indent it or not.
My solution was this one
import json with open("message.json") as message_json: pass message=json.load(message_json) print(message['text'])
looks like python needs the variable to be indented under the Pass block in order to save the contento of the json
Print doesn’t need to be indented, as shown here.
pass is just a null statement. You use it to test your code when you’re using with before writing anything after it so you don’t get an end of frame error. Once you have the message portion, you can delete pass.