Python & ML tasks
416 subscribers
2 photos
3 links
Python, functions, classes, iterators, generators, numpy, pandas, scikit-learn, TensorFlow
for advertising: @dina_ladnyuk

For advertising and donations in USD:
SWIFTBIC BUKBGB22
IBAN GB40 BUKB 2047 3453 2396 99
Mrs Dina Ladnyuk
Download Telegram
What will this code do?
print(bool("0"), bool([0, None]), bool((None,)))
What will this code do?
b, c, a = c, a, b = 1, 2, 3
print(a, b, c)
What will this code do?
a, b = 5, 15
print(a == 5 == b / 3 == 4 + 1)
What will this code do?
len(str(1 + 1) * int('1' + '1'))
What will this code do?
import time
my_time = time.strptime("Mon Feb 22 10:55:00 2021")
my_time = time.strftime("%d.%m.%Y", my_time)
print(my_time)
What will this code do?
import time
time.asctime((2021, 2, 23, 12, 0, 0, 1, 0, 0))
What will this code do?
def f(**x): 
return sum(x.values())
s = f(a=1, b=2) + f(x=2, y=1, z=0)
print(s)
What will this code do?
x = (i**2 for i in range(1, 100) if not i % 3)
y = (i for i in x if not i % 5)
print(next(y))
What will this code do?
import hashlib
m = hashlib.sha256()
m.update(b"hello")
print(m.digest_size, len(m.hexdigest()))
What will this code do?
import datetime
t1 = datetime.date(2021, 3, 5) - datetime.date(2021, 2, 23)
t2 = datetime.date(2020, 3, 5) - datetime.date(2020, 2, 23)
print((t2 - t1).days)