Skip to content

Instantly share code, notes, and snippets.

@Ignas
Forked from anonymous/gist:5cf2b3f0b67661f19a09
Last active December 12, 2015 13:20
Show Gist options
  • Save Ignas/ad5ca55d6e7e3fb92e11 to your computer and use it in GitHub Desktop.
Save Ignas/ad5ca55d6e7e3fb92e11 to your computer and use it in GitHub Desktop.
What is happeining!
>>> type([1 for i in [1]][0]) is type([1.0 for a in [1]][0])
False
>>> type([1 for i in [1]][0]) is type([1.0 for i in [1]][0]) is int
True
>>> type([1.0 for i in [1]][0]) is type([1 for i in [1]][0]) is float
True
>>> [1 for i in [1]][0] is [1.0 for i in [1]][0]
True
>>> [1.0 for i in [1]][0] is [1 for i in [1]][0]
True
>>> [1.0 for i in [1]][0] is [1 for i in [1]][0] is 1
False
>>> [1 for i in [1]][0] is [1.0 for i in [1]][0] is 1
True
>>> [1 for i in [1]][0] is [1.0 for a in [1]][0] is 1
False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment