擅长:python、mysql、java
<p>你的压痕掉了。试试这个:</p>
<pre><code>def main():
print "hello"
if __name__=='__main__':
main()
</code></pre>
<hr/>
<p>所有功能块以及循环块都必须缩进一个制表符或4个空格(取决于环境)。</p>
<pre><code>if condition :
statements //Look at the indentation here
...
Out-of-block //And here
</code></pre>
<p>有关一些解释,请参阅<a href="http://docs.python.org/release/2.5.1/ref/indentation.html" rel="nofollow">this</a>。</p>