How to add an indent in Python Shell IDLE

0

Okay, this seems easy enough unless you are a newbie to Python language. I’ve been learning it as well and found that creating a new program in IDLE and just hitting tab like you would in a Notepad++ or some other editor doesn’t work, you’ll get an unexpected tab or space error.

So, how do you indent? Simple. Go to “Format” in the IDLE program bar and just click “Indent Region” and that is it. Short cut is ]+command in Mac (so I’m assuming its ctrl+] in windows, but I’m not sure).

Hope that saves some of you headaches when you can’t seem to figure out how to get your Python program to work.

LEAVE A REPLY