Fix Broken Links
This commit is contained in:
@@ -6,12 +6,12 @@ lists, sets, and dictionaries and discusses common data handling
|
||||
idioms. The last part of this section dives a little deeper
|
||||
into Python's underlying object model.
|
||||
|
||||
* [2.1 Datatypes and Data Structures](01_Datatypes)
|
||||
* [2.2 Containers](02_Containers)
|
||||
* [2.3 Formatted Output](03_Formatting)
|
||||
* [2.4 Sequences](04_Sequences)
|
||||
* [2.5 Collections module](05_Collections)
|
||||
* [2.6 List comprehensions](06_List_comprehension)
|
||||
* [2.7 Object model](07_Objects)
|
||||
* [2.1 Datatypes and Data Structures](01_Datatypes.md)
|
||||
* [2.2 Containers](02_Containers.md)
|
||||
* [2.3 Formatted Output](03_Formatting.md)
|
||||
* [2.4 Sequences](04_Sequences.md)
|
||||
* [2.5 Collections module](05_Collections.md)
|
||||
* [2.6 List comprehensions](06_List_comprehension.md)
|
||||
* [2.7 Object model](07_Objects.md)
|
||||
|
||||
[Contents](../Contents)
|
||||
[Contents](../Contents.md)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[Contents](../Contents) \| [Previous (1.6 Files)](../01_Introduction/06_Files) \| [Next (2.2 Containers)](02_Containers)
|
||||
[Contents](../Contents.md) \| [Previous (1.6 Files)](../01_Introduction/06_Files.md) \| [Next (2.2 Containers)](02_Containers)
|
||||
|
||||
# 2.1 Datatypes and Data structures
|
||||
|
||||
@@ -242,7 +242,7 @@ shares and the price:
|
||||
```
|
||||
|
||||
Is math broken in Python? What’s the deal with the answer of
|
||||
3220.0000000000005?
|
||||
3220.0000000000005?
|
||||
|
||||
This is an artifact of the floating point hardware on your computer
|
||||
only being able to accurately represent decimals in Base-2, not
|
||||
@@ -446,4 +446,4 @@ dict_items([('name', 'AA'), ('shares', 75), ('price', 32.2), ('date', (6, 11, 20
|
||||
>>>
|
||||
```
|
||||
|
||||
[Contents](../Contents) \| [Previous (1.6 Files)](../01_Introduction/06_Files) \| [Next (2.2 Containers)](02_Containers)
|
||||
[Contents](../Contents.md) \| [Previous (1.6 Files)](../01_Introduction/06_Files.md) \| [Next (2.2 Containers)](02_Containers)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[Contents](../Contents) \| [Previous (2.1 Datatypes)](01_Datatypes) \| [Next (2.3 Formatting)](03_Formatting)
|
||||
[Contents](../Contents.md) \| [Previous (2.1 Datatypes)](01_Datatypes) \| [Next (2.3 Formatting)](03_Formatting)
|
||||
|
||||
# 2.2 Containers
|
||||
|
||||
This section discusses lists, dictionaries, and sets.
|
||||
This section discusses lists, dictionaries, and sets.
|
||||
|
||||
### Overview
|
||||
|
||||
@@ -205,7 +205,7 @@ for the rest of this course. Do your work in the file `Work/report.py`.
|
||||
### Exercise 2.4: A list of tuples
|
||||
|
||||
The file `Data/portfolio.csv` contains a list of stocks in a
|
||||
portfolio. In [Exercise 1.30](../01_Introduction/07_Functions), you
|
||||
portfolio. In [Exercise 1.30](../01_Introduction/07_Functions.md), you
|
||||
wrote a function `portfolio_cost(filename)` that read this file and
|
||||
performed a simple calculation.
|
||||
|
||||
@@ -442,5 +442,5 @@ should take the list of stocks in Exercise 2.5 and the dictionary of
|
||||
prices in Exercise 2.6 and computes the current value of the portfolio
|
||||
along with the gain/loss.
|
||||
|
||||
[Contents](../Contents) \| [Previous (2.1 Datatypes)](01_Datatypes) \| [Next (2.3 Formatting)](03_Formatting)
|
||||
[Contents](../Contents.md) \| [Previous (2.1 Datatypes)](01_Datatypes) \| [Next (2.3 Formatting)](03_Formatting)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[Contents](../Contents) \| [Previous (2.2 Containers)](02_Containers) \| [Next (2.4 Sequences)](04_Sequences)
|
||||
[Contents](../Contents.md) \| [Previous (2.2 Containers)](02_Containers) \| [Next (2.4 Sequences)](04_Sequences)
|
||||
|
||||
# 2.3 Formatting
|
||||
|
||||
@@ -77,7 +77,7 @@ You can use the `format_map()` method to apply string formatting to a dictionary
|
||||
```
|
||||
|
||||
It uses the same codes as `f-strings` but takes the values from the
|
||||
supplied dictionary.
|
||||
supplied dictionary.
|
||||
|
||||
### format() method
|
||||
|
||||
@@ -92,7 +92,7 @@ keyword arguments.
|
||||
>>>
|
||||
```
|
||||
|
||||
Frankly, `format()` is a bit verbose. I prefer f-strings.
|
||||
Frankly, `format()` is a bit verbose. I prefer f-strings.
|
||||
|
||||
### C-Style Formatting
|
||||
|
||||
@@ -299,4 +299,4 @@ How would you modify your code so that the price includes the currency symbol ($
|
||||
IBM 100 $106.28 35.84
|
||||
```
|
||||
|
||||
[Contents](../Contents) \| [Previous (2.2 Containers)](02_Containers) \| [Next (2.4 Sequences)](04_Sequences)
|
||||
[Contents](../Contents.md) \| [Previous (2.2 Containers)](02_Containers) \| [Next (2.4 Sequences)](04_Sequences)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[Contents](../Contents) \| [Previous (2.3 Formatting)](03_Formatting) \| [Next (2.5 Collections)](05_Collections)
|
||||
[Contents](../Contents.md) \| [Previous (2.3 Formatting)](03_Formatting) \| [Next (2.5 Collections)](05_Collections)
|
||||
|
||||
# 2.4 Sequences
|
||||
|
||||
@@ -546,4 +546,4 @@ Also, be aware that `zip()` stops once the shortest input sequence is exhausted.
|
||||
>>>
|
||||
```
|
||||
|
||||
[Contents](../Contents) \| [Previous (2.3 Formatting)](03_Formatting) \| [Next (2.5 Collections)](05_Collections)
|
||||
[Contents](../Contents.md) \| [Previous (2.3 Formatting)](03_Formatting) \| [Next (2.5 Collections)](05_Collections)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[Contents](../Contents) \| [Previous (2.4 Sequences)](04_Sequences) \| [Next (2.6 List Comprehensions)](06_List_comprehension)
|
||||
[Contents](../Contents.md) \| [Previous (2.4 Sequences)](04_Sequences) \| [Next (2.6 List Comprehensions)](06_List_comprehension)
|
||||
|
||||
# 2.5 collections module
|
||||
|
||||
@@ -168,4 +168,4 @@ in all of Python. In fact, we could do an extended tutorial on just
|
||||
that. However, doing so now would also be a distraction. For now,
|
||||
put `collections` on your list of bedtime reading for later.
|
||||
|
||||
[Contents](../Contents) \| [Previous (2.4 Sequences)](04_Sequences) \| [Next (2.6 List Comprehensions)](06_List_comprehension)
|
||||
[Contents](../Contents.md) \| [Previous (2.4 Sequences)](04_Sequences) \| [Next (2.6 List Comprehensions)](06_List_comprehension)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[Contents](../Contents) \| [Previous (2.5 Collections)](05_Collections) \| [Next (2.7 Object Model)](07_Objects)
|
||||
[Contents](../Contents.md) \| [Previous (2.5 Collections)](05_Collections) \| [Next (2.7 Object Model)](07_Objects)
|
||||
|
||||
# 2.6 List Comprehensions
|
||||
|
||||
@@ -310,7 +310,7 @@ of the file:
|
||||
|
||||
Oh my, you just reduced much of the `read_portfolio()` function to a single statement.
|
||||
|
||||
### Commentary
|
||||
### Commentary
|
||||
|
||||
List comprehensions are commonly used in Python as an efficient means
|
||||
for transforming, filtering, or collecting data. Due to the syntax,
|
||||
@@ -326,4 +326,4 @@ extraction, and so forth. Becoming a guru master of list
|
||||
comprehensions can substantially reduce the time spent devising a
|
||||
solution. Also, don't forget about the `collections` module.
|
||||
|
||||
[Contents](../Contents) \| [Previous (2.5 Collections)](05_Collections) \| [Next (2.7 Object Model)](07_Objects)
|
||||
[Contents](../Contents.md) \| [Previous (2.5 Collections)](05_Collections) \| [Next (2.7 Object Model)](07_Objects)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[Contents](../Contents) \| [Previous (2.6 List Comprehensions)](06_List_comprehension) \| [Next (3 Program Organization)](../03_Program_organization/00_Overview)
|
||||
[Contents](../Contents.md) \| [Previous (2.6 List Comprehensions)](06_List_comprehension) \| [Next (3 Program Organization)](../03_Program_organization/00_Overview)
|
||||
|
||||
# 2.7 Objects
|
||||
|
||||
This section introduces more details about Python's internal object model and
|
||||
This section introduces more details about Python's internal object model and
|
||||
discusses some matters related to memory management, copying, and type checking.
|
||||
|
||||
### Assignment
|
||||
@@ -451,4 +451,4 @@ Bonus: How would you modify this example to additionally parse the
|
||||
Spend some time to ponder what you’ve done in this exercise. We’ll
|
||||
revisit these ideas a little later.
|
||||
|
||||
[Contents](../Contents) \| [Previous (2.6 List Comprehensions)](06_List_comprehension) \| [Next (3 Program Organization)](../03_Program_organization/00_Overview)
|
||||
[Contents](../Contents.md) \| [Previous (2.6 List Comprehensions)](06_List_comprehension) \| [Next (3 Program Organization)](../03_Program_organization/00_Overview)
|
||||
|
||||
Reference in New Issue
Block a user