title: Is Python a weakly typed language as variables can switch types?
body: <p>The way I understand it, the following is allowed in PHP because it's a weakly-typed language.</p>
  
  <pre><code>$var = 'Hello';
  $var = 5;
  </code></pre>
  
  <p>I just installed a Windows version of Python 2.6 and I was expecting it NOT to let me change type just like that, but the Python equivalent of the above code works just like in PHP yikes!</p>
  
  <pre><code>&gt;&gt;&gt; var = "Hello"
  &gt;&gt;&gt; type(var)
  &lt;type 'str'&gt;
  &gt;&gt;&gt; var = 5
  &gt;&gt;&gt; type(var)
  &lt;type 'int'&gt;
  </code></pre>
  
  <p>Is my understanding of weak/strong typing flawed?</p>