Skip to content

Commit 4a6d3d4

Browse files
committed
add topics section
1 parent e021ff4 commit 4a6d3d4

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@ Additional material:
1818
| Time complexity | <https://wiki.python.org/moin/TimeComplexity> |
1919
| Python collections | <https://docs.python.org/3/library/collections.html> |
2020

21+
## Topics
22+
23+
1. [Primitive Types](#primitive-types).
24+
1. [Tuples](#tuples).
25+
1. [Lists](#lists).
26+
1. [Strings](#strings).
27+
1. [Stacks](#stacks).
28+
1. [Queues](#queues).
29+
1. [Sets](#sets).
30+
1. [Hash Tables](#hash-tables).
31+
1. [Heaps](#heaps).
32+
1. [Collections](#collections):
33+
1. [namedtuple](#collections.namedtuple).
34+
1. [defaultdict](#collections.defaultdict).
35+
1. [Counter](#collections.counter).
36+
1. [OrderedDict](#collections.ordereddict).
37+
2138
## Primitive Types
2239

2340
1. Booleans (`bool`).
@@ -480,7 +497,11 @@ You can overcome this problem by applying one of the following strategies:
480497
>>> heapq.heappop(min_heap) # `IndexError: index out of range`
481498
```
482499

483-
### collections.namedtuple
500+
### collections
501+
502+
Container datatypes ([collections package](<https://docs.python.org/3/library/collections.html>)).
503+
504+
#### collections.namedtuple
484505

485506
```python
486507
>>> from collections import namedtuple
@@ -513,7 +534,7 @@ True
513534
True
514535
```
515536

516-
### collections.defaultdict
537+
#### collections.defaultdict
517538

518539
```python
519540
>>> from collections import defaultdict
@@ -536,7 +557,7 @@ defaultdict(<class 'int'>, {'x': 3, 'y': 10})
536557
defaultdict(<class 'list'>, {'x': [1, 2]})
537558
```
538559

539-
### collections.Counter
560+
#### collections.Counter
540561

541562
```python
542563
>>> from collections import Counter
@@ -558,7 +579,7 @@ c 2
558579
0
559580
```
560581

561-
### collections.OrderedDict
582+
#### collections.OrderedDict
562583

563584
```python
564585
>>> from collections import OrderedDict
1.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)