date | duration | maintainer | order | title |
---|---|---|---|---|
w01d01 |
75 |
John-Tate |
5 |
Optional Python Review |
With the Python Review and Best Practices notebook, students should be able to:
- Know when to use tuples vs lists vs sets vs dictionaries
- Understand at a high level the concept of immutability
- Have an understanding of how each data type is converted to a boolean, and how to check each type for existence
- Know how to loop through data, including using enumerate
- How to write functions and document code effectively
- How to handle errors using try-except or raise
After the Importing with Python section, the students should know how to:
- Import a module
- Use
from x import y
- Understand the basics of namespaces
None
The goal of this notebook is to walk students through all of the common data types in Python, as well as a few "extra" ones - then to spend time talking about best practices such as using truthiness, list comprehensions, generators, etc. All of the notebook is notated throughout to act as a reference for students. There are several points with questions to ask the students before running a cell. There are also 2 exercises embedded in the lecture.
This notebook demonstrates some of the subtle aspects of importing modules in Python and demonstrates how to use your own modules. This is meant to act as a reference and is heavily annotated.