fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@ -0,0 +1,32 @@
---
title: Learn About Python Sets
---
`Set`s in Python are a type of mutable but unordered data structure, which can only contain *unique* elements.
**Creation:**
`set` literal:
Curly brackets, `{}`, *cannot* be used to create an empty set:
```python
>>> not_set = {} # set constructor must be used to make empty sets.
>>> type(not_set) # Empty curly brackets create empty dictionaries.
<class 'dict'>
```
You can only create an empty set by using the `set()` method.
```python
>>> example_set = set()
>>> type(example_set)
<class 'set'>
```
However, if elements are included within the curly brackets, then it would be acceptable syntax to create a set.
```python
>>> example_set_2 = {1, 2, 3}
>>> type(example_set_2)
<class 'set'>
````