Last active
June 3, 2019 17:13
-
-
Save kgashok/d8b106584f784570c7b76c7130aba7d4 to your computer and use it in GitHub Desktop.
"Tuples are immutable, but their mutable constituents, if any, are mutable!"
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
tup1 = (1, 2, [3, 4, 5]) | |
print(tup1) | |
print("Tuples are immutable, but their mutable constituents, if any, are mutable!") | |
tup1[2][2] = 'x' | |
print(tup1) | |
# (1, 2, [3, 4, 'x']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment