summaryrefslogtreecommitdiff
path: root/algo/sort_and_search.py
diff options
context:
space:
mode:
authorzhang <zch921005@126.com>2020-03-14 19:21:48 +0800
committerzhang <zch921005@126.com>2020-03-14 19:21:48 +0800
commit4494a05c909ed71356873e3295c1af5c7ac11201 (patch)
tree40f8dbc333683a98c59c624a49c31130dcba641d /algo/sort_and_search.py
parenta2540a2de6cce2f3b4c99b5198906a84d64cc2c7 (diff)
python搜索与排序
Diffstat (limited to 'algo/sort_and_search.py')
-rw-r--r--algo/sort_and_search.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/algo/sort_and_search.py b/algo/sort_and_search.py
new file mode 100644
index 0000000..2c89fe5
--- /dev/null
+++ b/algo/sort_and_search.py
@@ -0,0 +1,10 @@
+
+import bisect
+from collections import namedtuple
+
+bisect.bisect_left()
+
+l = [1, 3, 2]
+l.sort()
+
+namedtuple