I am getting an IndentationError when trying to run my program in a Python Interpreter:
line 127
global map
^
IndentationError: expected an indented block
I am using python version 2.7
What's wrong with the following code?:
def make_map():
global map
Python expects 4 spaces or a tab to indent and align code - similar to Java expecting curly {} brackets are the start of a loop, method or class etc.
should be formatted as
It appears that your code throws an exception on line 127, so check this and indent the code as required.