Skip to content

Commit 1e3a56e

Browse files
committed
Tuples and Assignment
1 parent b83c741 commit 1e3a56e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Tuples/4.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Tuples and Assignment
2+
3+
# We can also put a tuple on the left-hand side of an assignment statement
4+
5+
# We can even omit the parentheses
6+
7+
(x, y) = (4, 'fred')
8+
print(y)
9+
10+
(a, b) = (99, 98)
11+
print(a)

0 commit comments

Comments
 (0)