Skip to content

Commit 1055243

Browse files
Lists, Dictionaries and Sets more info
1 parent ea80a81 commit 1055243

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Lists&Dictionaries/README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
## Lists & Dictionaries
22

3-
3+
### List
44
- Can store different data types in a list
5+
- Ordered
6+
- Allows duplicates
7+
- Mutable
58

69
### How to declare a list
710

@@ -38,9 +41,10 @@ myNewList.append("ALAN <3 C!!!!")
3841
## Tuples
3942

4043
- A tuple is a collection which is:
41-
- ordered
42-
- unchangeable(no modification, no adding, no removing).
44+
- Ordered
45+
- Immutable
4346
- In Python tuples are written with parenthesis
47+
- Duplicates allowed
4448

4549
```python
4650
omarTuple=(5,2,3,5,41,4)
@@ -50,6 +54,11 @@ print("The number location of 'For Angela: ' is: %d" %omarTuple.index("For Angel
5054

5155
## Dictionaries
5256

57+
- A dictionary is a collection which is:
58+
- Ordered
59+
- Mutable
60+
- No Duplicates
61+
5362
### Declaration of a Dictionary
5463

5564
```python
@@ -90,4 +99,4 @@ for x in sortedNames:
9099

91100
```python
92101
goodMajors["Alan"]= "2526 56837 7652626"
93-
```
102+
```

0 commit comments

Comments
 (0)