Created
November 28, 2017 02:51
-
-
Save macintux/3fabcd1d9e78fe98cf6b355aad19ffea to your computer and use it in GitHub Desktop.
THIS IS WHY I HATE MUTABILITY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> head = 9 | |
>>> ranks = [9, 8, 7, 6, 5] | |
>>> range(head, head-5, -1) | |
[9, 8, 7, 6, 5] | |
>>> range(head, head-5, -1) == ranks | |
True | |
>>> ranks.pop(0) | |
9 | |
>>> ranks.pop(0) == 9 | |
False | |
>>> ranks | |
[7, 6, 5] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment