Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c92df58

Browse files
authored
Merge pull request dabeaz-course#35 from encukou/patch-1
Fix a few typos
2 parents de55787 + 2238619 commit c92df58

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

Notes/01_Introduction/05_Lists.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ t = sorted(s) # s unchanged, t holds sorted values
157157
>>> nums * 2
158158
[1, 2, 3, 4, 5, 1, 2, 3, 4, 5]
159159
>>> nums + [10, 11, 12, 13, 14]
160-
[1, 2, 3, 4, 5, 10, 11, 12, 13, 14] >>>
160+
[1, 2, 3, 4, 5, 10, 11, 12, 13, 14]
161161
```
162162

163163
Specifically, lists don't represent vectors/matrices as in MATLAB, Octave, R, etc.

Notes/02_Working_with_data/03_Formatting.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ Common modifiers adjust the field width and decimal precision. This is a partia
5858
```code
5959
:>10d Integer right aligned in 10-character field
6060
:<10d Integer left aligned in 10-character field
61-
:^10d Integer centered in 10-character field :0.2f Float with 2 digit precision
61+
:^10d Integer centered in 10-character field
62+
:0.2f Float with 2 digit precision
6263
```
6364

6465
### Dictionary Formatting

Notes/02_Working_with_data/04_Sequences.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ There are some common functions to reduce a sequence to a single value.
9898
>>> s = [1, 2, 3, 4]
9999
>>> sum(s)
100100
10
101-
>>> min(s) 1
102-
>>> max(s) 4
101+
>>> min(s)
102+
1
103+
>>> max(s)
104+
4
103105
>>> t = ['Hello', 'World']
104106
>>> max(t)
105107
'World'

Notes/02_Working_with_data/07_Objects.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ This is known as a shallow copy. Here is a picture.
146146

147147
### Deep copies
148148

149-
Sometimes you need to make a copy of an object and all the objects contained withn it.
149+
Sometimes you need to make a copy of an object and all the objects contained within it.
150150
You can use the `copy` module for this:
151151

152152
```python

0 commit comments

Comments
 (0)