start repository

This commit is contained in:
2022-07-12 07:25:44 +02:00
commit ecdeb0a44c
14 changed files with 3900 additions and 0 deletions

25
tescik.py Normal file
View File

@@ -0,0 +1,25 @@
# x = {1: 20, 3: 40, 4: 30, 2: 10, 0: 0}
# list_of_tuple = sorted(x.items(), key=lambda item: item[0])
# print([ v for k, v in list_of_tuple])
# print( { k: v for k, v in sorted(x.items(), key=lambda item: item[0])} )
l = [5, 8, 2, 4, 1, 10, None]
class test:
def __init__(self, l) -> None:
self.l = l
def print(self):
print(l)
t = test(l)
l.sort(key=lambda x: (x is None, x))
t.print()