Corrected (?):
def parse(data):
print(data)
def get_set(json_url):
url = json_url
response = urllib.urlopen(url)
data = json.loads(response.read())
s_code="0"
print data
s_code = data["statusCode"]
print s_code
seconds_waiting = 10
if s_code == 200:
url = json_url
response = urllib.urlopen(url)
data = json.loads(response.read())
parse(data)
elif s_code != 200:
print "waiting " + str(seconds_waiting) + " second(s)..."
time.sleep(seconds_waiting)
get_set(json_url)
Indentation is one of the major features / requirements in Python. If the above code was in a class it would need to be indented once again. But as pointed out in the comments, please read the official tutorial (again).
solved Python syntax error in identation? [closed]