Skip to content

Instantly share code, notes, and snippets.

@didip
Created August 3, 2012 19:27
Show Gist options
  • Save didip/3250687 to your computer and use it in GitHub Desktop.
Save didip/3250687 to your computer and use it in GitHub Desktop.
testing dict merge if keys are integers
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = {1:1}
>>> b = {2:2}
>>> dict(a, **b)
{1: 1, 2: 2}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment