Are they huge, hard to remember? - May be, yes. But, by experience we can adopt to this convention.
Here is the way,
black - is a python library that helps to take care of these conventions. Let see how it works!
print('black - is a python library that helps to take care of the code formatting work. Let see how it works!')
for item in (1,2,3,):
dummyDict[item]=item
print(dummyDict)
- Any line should not exceed 72 characters
- have to apply space before and after any operator( = , == + )
- For indentation we can go up to 4 spaces
- (1,2,3,)-> Here, the trailing comma(,) is not needed, also the space after , is advisable.
Well, how the library 'black' is going to help us to auto-format?
step 1: Installation: pip install black
step 2: black {source_file_or_directory}(black sample.py)