Skip to content

Commit 7eeb253

Browse files
committed
tuple
1 parent 084ae86 commit 7eeb253

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

05. Tuple & Lists/Simple.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@
55

66
print(f"first dimension is: {dimensions[0]}")
77

8+
# dimensions [0] = 250 # this will give error. because tuple is immutable
89

10+
# you can reassign a tuple for e.g
11+
12+
dimensions = (100,200)
13+
print(f"first dimension is: {dimensions[0]}")

0 commit comments

Comments
 (0)