Created
June 30, 2019 15:13
-
-
Save traderbagel/a40b9afea004d8ae202502c14416cda0 to your computer and use it in GitHub Desktop.
Contruct a tuple with only one elements
This file contains 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
# tuple | |
single_tuple = (1,) | |
# integer | |
# Python thinks it's part of a mathematical operation and has precedence | |
not_tuple = (1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment