Python & ML tasks
414 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?
c = filter(lambda x: x>=3, map(lambda x: x+x, (1, 2, 3, 4)))
print(list(c))
What will this code do?
def unpacking(x, y, z):
print(x, y, z, end=" ")
tuple_vec = (1, 0, 1)
dict_vec = {'x': 1, 'y': 0, 'z': 1}
unpacking(*tuple_vec)
unpacking(**dict_vec)
What will this code do?
7//3 + 7//-3
Choose your answer
Anonymous Quiz
6%
2
9%
1
62%
0
13%
-1
5%
2
5%
See solution
😱6
What will this code do?
class B:
def __init__(self):
self.arr = []
def __getattr__(self, attrname):
return getattr(self.arr, attrname)

b = B()
b.append(1)
b.append(2)
b.append(3)
b.pop()
print(b.arr)
What will this code do?
",".join(['1', '2', '3', '4'])
What will this code do?
print(type(type(bool(1))))
What will this code do?
x = float('inf')
s = x - x
print(s)
What will this code do?
import numpy as np
import pandas as pd
a = pd.np.array([1, 2, 3])
b = np.array([-3, 2, 1])
print(a @ b)
What will this code do?
print(list(map(lambda f: f(2), [lambda x: x**i for i in range(3)])))
What will this code do?
print(list(map(lambda f: f(2), (lambda x: x**i for i in range(3)))))