added Renata files and developed beauty output

This commit is contained in:
ada-dmitry
2024-05-12 22:57:10 +03:00
parent 28d23a5cbd
commit 32a35ea419
24 changed files with 652 additions and 21 deletions
+17
View File
@@ -0,0 +1,17 @@
from datetime import datetime
def max_len(vals, index):
tmp = -1
for i in vals:
tmp = max(tmp, len(i[index]))
if index == 2:
return max(tmp, 3)
return max(tmp, 7)
def check_format(val):
format = "%Y-%m-%d"
res = True
try:
res = bool(datetime.strptime(val, format))
except ValueError:
res = False
return not(res)