From 7451edff7692e86c5238ff7bc6659825e242a84e Mon Sep 17 00:00:00 2001
From: Sudipto Mallick <>
Date: Tue, 2 Jan 2024 03:38:10 +0000
Subject: Quick backup, need to be rewritten
---
python/code/2/3.py | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 python/code/2/3.py
(limited to 'python/code/2/3.py')
diff --git a/python/code/2/3.py b/python/code/2/3.py
new file mode 100644
index 0000000..2a8dd10
--- /dev/null
+++ b/python/code/2/3.py
@@ -0,0 +1,6 @@
+items = [(0, 'd'), (1, 'a'), (2, 'c'), (3, 'b')]
+
+print(max(items, key=lambda it: it[0]))
+print(min(items, key=lambda it: it[1]))
+items.sort(key=lambda x: ord(x[1]) - x[0])
+print(items)
--
cgit 1.4.1-2-gfad0
5cb'/>
Profanity fork with TTY improvements | danisanti <danisanti@tilde.institute> |
blob: 8c803ab5b5f06c70568912e85e8e9fc4cc8d54b5 (
plain) (
tree)