summary refs log tree commit diff stats
path: root/python/code/2/3.py
diff options
context:
space:
mode:
authorSudipto Mallick <>2024-01-02 03:38:10 +0000
committerSudipto Mallick <>2024-01-02 03:38:10 +0000
commit7451edff7692e86c5238ff7bc6659825e242a84e (patch)
tree830fe25caf403869fe77df83bc44822ea6f5f11d /python/code/2/3.py
parenta70e0a59817ce06a3dd23b3750ae16ee6660deaf (diff)
downloadzadania-7451edff7692e86c5238ff7bc6659825e242a84e.tar.gz
Quick backup, need to be rewritten
Diffstat (limited to 'python/code/2/3.py')
-rw-r--r--python/code/2/3.py6
1 files changed, 6 insertions, 0 deletions
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)