File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 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
4650omarTuple= (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
92101goodMajors[" Alan" ]= " 2526 56837 7652626"
93- ```
102+ ```
You can’t perform that action at this time.
0 commit comments