-
Comments
-
Lists (just an array)
- Slice syntax
- name_of_list[start:end:step]
-
Dictionaries (just an object)
- Accessing items inside a dict
-
Nesting (lists in dicts in lists in dicts???)
some_data = [{"name": "mei", "favourite_food": ["avocado", "potato", "kale"]}] # To get avocado print(some_data[0]['favourite_food'][0])
-
Tuples (fixed order, immutable)
- e.g.,
my_tuple = (1, January, 2019)
- List should have homogenous data, while tuple should have heterogenous
- List vs tuple: https://www.programiz.com/python-programming/list-vs-tuples
- e.g.,
-
Sets (no duplicate values)
- Useful for comparison
-
Loops (for i in my_list)
-
Loops challenge
-
Search algorithm
- Linear search
- Binary search
-
Roman numerals again
Last active
October 23, 2019 06:53
-
-
Save yi-mei-wang/068c32c943fb2b05dd3bb77fdffbe5c6 to your computer and use it in GitHub Desktop.
Python day 1 part 2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment