Created
January 20, 2022 12:54
-
-
Save thetongs/f42f5b244e694f3380b3bc1dab29d9d7 to your computer and use it in GitHub Desktop.
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 | |
var_tuple = (1, 2, 3, 4, 5) | |
print(var_tuple) | |
print(type(var_tuple)) | |
# (1, 2, 3, 4, 5) | |
# <class 'tuple'> | |
var_tuple = (1, "Hello") | |
print(var_tuple) | |
# (1, 'Hello') | |
var_tuple[0] = 2 | |
print(var_tuple) | |
# TypeError: 'tuple' object does not support item assignment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment