Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor fixes of 06_tuples.md and 07_sets.md #512

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion 06_Day_Tuples/06_tuples.md
Expand Up @@ -93,7 +93,7 @@ len(tpl)
first_fruit = fruits[0]
second_fruit = fruits[1]
last_index =len(fruits) - 1
last_fruit = fruits[las_index]
last_fruit = fruits[last_index]
```

- Negative indexing
Expand Down
6 changes: 3 additions & 3 deletions 07_Day_Sets/07_sets.md
Expand Up @@ -34,7 +34,7 @@
- [Checking Subset and Super Set](#checking-subset-and-super-set)
- [Checking the Difference Between Two Sets](#checking-the-difference-between-two-sets)
- [Finding Symmetric Difference Between Two Sets](#finding-symmetric-difference-between-two-sets)
- [Joining Sets](#joining-sets-1)
- [Checking disjoint Sets](#checking-disjoint-sets)
- [💻 Exercises: Day 7](#-exercises-day-7)
- [Exercises: Level 1](#exercises-level-1)
- [Exercises: Level 2](#exercises-level-2)
Expand Down Expand Up @@ -365,7 +365,7 @@ dragon = {'d', 'r', 'a', 'g', 'o','n'}
python.symmetric_difference(dragon) # {'r', 't', 'p', 'y', 'g', 'a', 'd', 'h'}
```

### Joining Sets
### Checking disjoint Sets

If two sets do not have a common item or items we call them disjoint sets. We can check if two sets are joint or disjoint using _isdisjoint()_ method.

Expand All @@ -380,7 +380,7 @@ st2.isdisjoint(st1) # False

```py
even_numbers = {0, 2, 4 ,6, 8}
even_numbers = {1, 3, 5, 7, 9}
odd_numbers = {1, 3, 5, 7, 9}
even_numbers.isdisjoint(odd_numbers) # True, because no common item

python = {'p', 'y', 't', 'h', 'o','n'}
Expand Down