运行程序时出错

时间:2017-01-12 02:57:58

标签: python python-2.7 python-3.x

<div class='parent'>
  <div class='child'>One</div>
  <div class='child'>Two</div>
  <div class='child'>Three</div>
  <div class='child'>One</div>
  <div class='child'>Two</div>
  <div class='child'>Three</div>
  <div class='child'>One</div>
  <div class='child mind'>mind</div>
  <div class='child'>Three</div>
  <div class='child'>
    <p>First paragraph</p>
  </div>
</div>

1 个答案:

答案 0 :(得分:0)

您可能有其他错误,但肯定没有声明name,所以

if name == 'main'

会引发错误。相反,它应该是

if __name__ == '__main__'