Заметки Питониста
14.8K subscribers
3.37K photos
18 videos
1.81K links
Все что связано с Python, уже в наших заметках.

Ссылка: @Portal_v_IT

Сотрудничество: @oleginc
Download Telegram
Варианты ответа:
Anonymous Quiz
49%
[2, 3, 4]
45%
(2, 3, 4)
7%
[2, 3]
lst = [x for x in range(10) if x % 2 == 0 if x % 3 == 0]
print(lst)


💕 Наш уютный чатик

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
55%
[0, 6]
30%
[0, 2, 3, 4, 6, 8, 9]
15%
SyntaxError
n = 3
while n > 0:
n -= 1
if n == 1:
break
else:
print("A", end=" ")
print(n)


💕 Наш уютный чатик

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
48%
A 1
22%
0
30%
1
x = [1, 2]
def f():
x += [3]

try:
f()
except UnboundLocalError:
print("Error")


💕 Наш уютный чатик

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
39%
[1, 2, 3]
48%
Error
13%
TypeError
print(True * 3 == 3, False + 5 == 5)


💕 Наш уютный чатик

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
53%
True True
21%
False False
26%
TypeError
for i in range(3):
if i == 5:
break
else:
print("A", end="")
print("B", end="")


💕 Наш уютный чатик

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
62%
AB
19%
B
9%
A
10%
Посмотреть ответ
d = {'a': 1, 'b': 2, 'c': 3}
try:
for k in d:
del d[k]
print(len(d))
except RuntimeError:
print("RuntimeError")


💕 Наш уютный чатик

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
36%
0
56%
RuntimeError
8%
KeyError
class Context:
def __enter__(self):
return "A"
def __exit__(self, *args):
return True

with Context() as c:
raise ValueError()

print(c)


💕 Наш уютный чатик

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
48%
A
43%
ValueError
9%
None
x = "global"
res = [x for x in ["local", "scope"]]
print(x)


💕 Наш уютный чатик

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
14%
scope
20%
local
66%
global
gen = (x for x in range(3))
list(gen)
print(list(gen))


💕 Наш уютный чатик

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
54%
[0, 1, 2]
43%
[]
3%
TypeError
This media is not supported in your browser
VIEW IN TELEGRAM
Появился новый провайдер LLM - SaveRouter: лёгкий и выгодный доступ к Fable 5 и Opus 4.8 🧠

Самые современные модели Anthropic стали доступны и без лимитов.

$50 на тестирование — каждому пользователю Telegram Premium при регистрации

Скидка 70% всем, кто зарегистрируется до 23:59 UTC 24.07 (3:00am по Мск)

• Лучший вариант для OpenClaw, Hermes и других AI-агентов
• Совместимость с Anthropic API: Claude Code, Cursor, Cline, aider — подключение за 2 минуты

👉 svrtr.org
tpl = ([],)
tpl[0].extend([1, 2])
print(tpl)


💕 Наш уютный чатик

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM