TGViewer
Channel Public Channel
Python Tasks & ML | Задачи по питону и машинному обучению

Python Tasks & ML | Задачи по питону и машинному обучению

@python_tasks

Algorithms, functions, classes, regular expressions, iterators, generators, OOP, exceptions, NumPy, pandas, scikit-learn
https://telega.in/c/python_tasks

Questions — @dina_ladnyuk
Subscribers
8.49K
Photos
30
Videos
1
Links
41

Showing posts older than #1473 · Back to latest

Older Posts 20 shown
Post #1472 2.53K
Что выведет код?
from functools import partial
def spam(a, b):
print(a, b)
s = partial(spam, b=1)
s(2)
  • 👍 2
Post #1471 2.94K
  • 👍 4
  • 🔥 2
Post #1470 2.76K
Что выведет код?
g = [lambda x, n=n: x+n for n in range(2)]
for f in g:
print(f(0), end='')
Post #1469 3.23K
  • 😱 15
  • 👍 7
Post #1468 2.99K
Что выведет код?
g = [lambda x: x+n for n in range(2)]
for f in g:
print(f(0), end='')
  • 👍 5
Post #1466 3.14K
Что выведет код?
x = 1
a = lambda y, x=x: x + y
x = 2
b = lambda y, x=x: x + y
print(a(3), b(3))
  • 👍 12
Post #1465 3.36K
  • 😱 11
  • 👍 9
  • 🤔 5
  • 💯 2
Post #1464 2.96K
Что выведет код?
x = 1
a = lambda y: x + y
x = 2
b = lambda y: x + y
print(a(3), b(3))
Post #1462 2.83K
  • 👍 13
  • 🔥 2
Post #1461 2.7K
Что выведет код?
s = ['3b', '1c', '2a']
x = sorted(s, key=lambda x: x[-1])
print(*x)
  • 👍 4
Post #1460 2.83K
  • 👍 15
  • 🔥 1
Post #1458 2.83K
  • 👍 7
  • 🔥 1
Post #1457 2.76K
Что выведет код?
def f(s='', l=[]):
s += '1'
l.append(1)
return s, l
f()
s, l = f()
print(len(s), len(l))
Post #1454 3.22K
  • 👍 3
  • 😱 1
Post #1453 2.88K
Что выведет код?
def f(): return 2, 1
b, a = f()
print(a, b)
  • 👍 7
Post #1452 3.12K
  • 👍 9
  • 😱 1
Post #1451 2.93K
Что выведет код?
def f(x: int) -> float:
pass
a = f.__annotations__
x = a["x"] is int
y = a["return"] is float
print(x, y)
  • 👍 6
Post #1450 3.16K
  • 👍 11
Older posts →
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →