title: Python Dictionary Object: SyntaxError: expression cannot contain assignment, perhaps you meant "=="?
body: <p>I am creating a dictionary object, it gets created while I use &quot;Statement 1&quot;, however I get an error message while try create a dictionary object using same keys and values with &quot;Statement 2&quot;.</p>
  <p><em><strong>Statement 1:</strong></em></p>
  <pre><code>dmap = {0: 'Mon', 1: 'Tue', 2: 'Wed', 3: 'Thu', 
          4: 'Fri', 5: 'Sat', 6: 'Sun'}
  </code></pre>
  <p><em><strong>Statement 2:</strong></em></p>
  <pre><code>dmap = dict(0='Mon', 1='Tue', 2='Wed', 3='Thu', 
              4='Fri', 5='Sat', 6='Sun'
  </code></pre>
  <p><em><strong>Error message:</strong></em></p>
  <pre><code>    File &quot;&lt;stdin&gt;&quot;, line 1
      SyntaxError: expression cannot contain assignment, perhaps you meant &quot;==&quot;?
  </code></pre>
  <p>Can someone tell me, why am I allowed to create dictionary with integer keys using Statement 1, but not with Statement 2?</p>
  <p><em><strong>Edited</strong></em>
  Using an updated version of Statement 2, I am able to create dictionary object with below code:</p>
  <pre><code>dmap = dict(day_0='Mon', day_1='Tue', day_2='Wed', 
              day_3='Thu', day_4='Fri', day_5='Sat', day_6='Sun')
  </code></pre>