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

Ссылка: @Portal_v_IT

Сотрудничество: @oleginc
Download Telegram
Варианты ответа:
Anonymous Quiz
49%
5
33%
2
18%
IndexError
class Model:
val = 1
lst = [val for _ in range(3)]

print(Model.lst)


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

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
44%
[1, 1, 1]
47%
NameError
9%
AttributeError
This media is not supported in your browser
VIEW IN TELEGRAM
👩‍💻 Всем программистам посвящается!

Вот 14 авторских обучающих IT каналов по самым востребованным областям программирования:

Выбирай своё направление:

👩‍💻 Python — t.me/python_ready
🤔 InfoSec & Хакинг — t.me/hacking_ready
🖥 SQL & Базы Данных — t.me/sql_ready
👩‍💻 IT Новости — t.me/it_ready
🤖 AI & ML — t.me/neuro_ready
👩‍💻 Frontend — t.me/frontend_ready
👩‍💻 C/C++ — https://t.me/cpp_ready
👩‍💻 C# & Unity — t.me/csharp_ready
👩‍💻 Linux — t.me/linux_ready
👩‍💻 Java — t.me/java_ready
📖 IT Книги — t.me/books_ready
📱 JavaScript — t.me/javascript_ready
🖼️ DevOps — t.me/devops_ready
🖥 Design —t.me/design_ready

📌 Гайды, шпаргалки, задачи, ресурсы и фишки для каждого языка программирования!
Please open Telegram to view this post
VIEW IN TELEGRAM
❤1
x = [1, 2, 3, 4, 5]
x[::2] = [10, 20, 30]
print(x)


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

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
60%
[10, 2, 20, 4, 30]
32%
[10, 20, 30, 4, 5]
9%
ValueError
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
52%
True
37%
False
11%
None
print(1 in [1, 2] == True)


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

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
52%
True
27%
False
21%
TypeError
gen = (x for x in range(3))
print(list(gen), list(gen))


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

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
30%
[0, 1, 2] [0, 1, 2]
66%
[0, 1, 2] []
4%
TypeError
print(any([0, "", False]))


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

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
38%
True
60%
False
2%
None
class A:
x = 1

class B(A):
pass

class C(A):
pass

B.x = 2
A.x = 3

print(C.x)


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

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
26%
1
32%
2
42%
3
def modify(x, y=[]):
y.append(x)
return sum(y)

result = modify(5) + modify(7) + modify(4)
print(result)


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

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
33%
16
61%
33
7%
21
gen = (x for x in range(3))
print(list(gen), list(gen))


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

#Python
Please open Telegram to view this post
VIEW IN TELEGRAM
Варианты ответа:
Anonymous Quiz
28%
[0, 1, 2] [0, 1, 2]
54%
[0, 1, 2] []
17%
TypeError
class Matrix:
def __init__(self, data):
self.data = data

def __add__(self, other):
return Matrix([[self.data[i][j] + other.data[i][j]
for j in range(len(self.data[0]))]
for i in range(len(self.data))])

def sum(self):
return sum(sum(row) for row in self.data)

m1 = Matrix([[1, 2], [3, 4]])
m2 = Matrix([[5, 6], [7, 8]])
result = m1 + m2
print(result.sum())

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

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