Reputation: 1
I'm getting an invalid syntax error on the print("Got Here"data)
line of the following code. I don't see any syntax errors.
import requests
import json
def test():
f = open('greenbook_1956.json')
print("Got Here"data)
data= json.load(f)
print(data['rows'][0])
Upvotes: 0
Views: 37
Reputation: 103
swap these two lines:
print("Got Here"data)
data= json.load(f)
and add a comma between data and 'Got Here'!
Upvotes: 1