擅长:python、mysql、java
<pre><code>Normal Code
Indent block
Indent block
Indent block 2
Indent block 2
</code></pre>
<p>你应该:</p>
<pre><code>def main():
print "hello"
if __name__=='__main__':
main()
</code></pre>
<p>它可以是空格或制表符。</p>
<p>此外,缩进不需要在整个文件中相同,而只需要在每个块中相同。</p>
<p>例如,您可以使用这样的工作文件,但不推荐使用。</p>
<pre><code>print "hello"
if True:
[TAB]print "a"
[TAB]i = 0
[TAB]if i == 0:
[TAB][SPACE][SPACE]print "b"
[TAB][SPACE][SPACE]j = i + 1
[TAB][SPACE][SPACE]if j == 1:
[TAB][SPACE][SPACE][TAB][TAB]print "c
</code></pre>