Python atuomatic indentation
Suppose I have Python code like the following:
import sys #just an example
a=10
....
# a lot of lines here
....
print(result)
Suppose I want to wrap the many lines of code between a=10 and
print(result) in a function, how do I make sure the code is properly and
automatically indented (especially for nested for-loops) when the code is
pasted inside the function?
Can anyone show the way to do it in editors such as Emacs, vim,
Sublimetext, etc.?
No comments:
Post a Comment