Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb6f1218

Browse files
committed
Add more assertions for tuples.
1 parenta43ac9b commitb6f1218

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/data_types/test_tuples.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,11 @@ def test_tuples():
7878
# is really just a combination of tuple packing and sequence unpacking.
7979

8080
# Swapping using tuples.
81+
# Data can be swapped from one variable to another in python using
82+
# tuples. This eliminates the need to use a 'temp' variable.
8183
first_number=123
8284
second_number=456
8385
first_number,second_number=second_number,first_number
84-
# Data can be swapped from one variable to another in python using
85-
# tuples. This eliminates the need to use a 'temp' variable.
86+
87+
assertfirst_number==456
88+
assertsecond_number==123

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp