sun = True
if sun:
print("beach")
else:
print("home")
it looks like this:
sun = True
if sun:
print("beach")
else:
print("home")
I guess even with “auto indent” turned on, the editor can’t guess that there will be an “else:” statement after print(“beach”), so it doesn’t de-indent and I have to do it myself.
Am I right or wrong? Is there a particular way to make auto indent work in this case?
PS: Another way of looking at it: is there an editor capable of removing the indentation from “else:” when I press the “Enter” key to continue my script?