Force an indent in Python code for organizational purposes
- by Vine
Is there a way to force an indent in Python?
I kind of want it for the sake of making the code look organized.
As an example:
# How it looks now
class Bro:
def __init__(self):
self.head = 1
self.head.eye = 2
self.head.nose = 1
self.head.mouth = 1
self.neck = 1
self.torso = 1
# How it'd look ideally (indenting sub-variables of 'head')
class Bro:
def __init__(self):
self.head = 1
self.head.eye = 2
self.head.nose = 1
self.head.mouth = 1
self.neck = 1
self.torso = 1
I imagine this is possible with some sort of workaround, yeah?