Skip to content

Commit a5fd789

Browse files
committed
Add \newpage after the index
1 parent 39524d0 commit a5fd789

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.vscode
33
misc
44

5+
*.bat
56
NOTES.md
67
TODO.md
78

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN apt-get update && \
1313

1414
COPY Makefile /repo/
1515
COPY README.md /repo/
16+
COPY USAGE.md /repo/
1617

1718
RUN mkdir /repo/artifacts
1819

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Additional material:
1919
| Python collections | <https://docs.python.org/3/library/collections.html> |
2020
| Time complexity | <https://docs.python.org/3/tutorial/datastructures.html> |
2121

22-
## Topics
22+
## Index
2323

2424
1. [Primitive Types](#primitive-types)
2525
1. [Tuples](#tuples)
@@ -31,10 +31,12 @@ Additional material:
3131
1. [Hash Tables](#hash-tables)
3232
1. [Heaps](#heaps)
3333
1. [Collections](#collections)
34-
1. [namedtuple](#collectionsnamedtuple)
35-
1. [defaultdict](#collectionsdefaultdict)
36-
1. [Counter](#collectionscounter)
37-
1. [OrderedDict](#collectionsordereddict)
34+
* [namedtuple](#collectionsnamedtuple)
35+
* [defaultdict](#collectionsdefaultdict)
36+
* [Counter](#collectionscounter)
37+
* [OrderedDict](#collectionsordereddict)
38+
39+
\newpage
3840

3941
## Primitive Types
4042

@@ -63,15 +65,15 @@ Additional material:
6365
>>> int('10a') # `ValueError: invalid literal for int() with base 10: '10a'`
6466

6567
# Operations
66-
>>> 2 * 2
67-
4
68-
>>> 2 * 2.
69-
4.0
68+
>>> 5 * 2
69+
10
70+
>>> 5 * 2.
71+
10.0
7072
>>> 5 / 2
7173
2.5
7274
>>> 5 // 2 # `//` is the integer division
7375
2
74-
>>> 3 % 2
76+
>>> 5 % 2
7577
1
7678

7779
# `min` and `max`
@@ -228,20 +230,20 @@ True
228230
True
229231

230232
# Built-in methods
231-
>>> l = [2, 1, 4, 3]
233+
>>> l = [3, 1, 2, 0]
232234
>>> len(l)
233235
4
234236
>>> min(l)
235-
1
237+
0
236238
>>> max(l)
237-
4
239+
3
238240
>>> sum(l)
239-
10
240-
>>> any(v == 4 for v in l)
241+
6
242+
>>> any(v == 3 for v in l)
241243
True
242244
>>> any(v == 5 for v in l)
243245
False
244-
>>> all(v > 0 for v in l)
246+
>>> all(v >= 0 for v in l)
245247
True
246248

247249
# Sort list in-place (`sort`)
118 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)