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

Commit9d666e8

Browse files
authored
Update README.md
set difference is directional in terms of the set being invoked. I update the explanation text and gave another example for s2-s1 case to show the difference.
1 parent49b0c30 commit9d666e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1710,13 +1710,15 @@ KeyError: 3
17101710

17111711
###set difference
17121712

1713-
`difference` or`-` will return only the elements that arein one ofthesets.
1713+
`difference` or`-` will return only the elements that areunique tothefirst set (invoked set).
17141714

17151715
```python
17161716
>>> s1= {1,2,3}
17171717
>>> s2= {2,3,4}
17181718
>>> s1.difference(s2)# or 's1 - s2'
17191719
{1}
1720+
>>> s2.difference(s1)# or 's2 - s1'
1721+
{4}
17201722
```
17211723

17221724
###set symetric_difference

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp