Algorithms, functions, classes, regular expressions, iterators, generators, OOP, exceptions, NumPy, pandas, scikit-learn
https://telega.in/c/python_tasks
Questions — @dina_ladnyuk
Post #795
2.04K
PY @python_tasks
Showing posts older than #796 · Back to latest
import numpy as np
array = np.arange(4)
array = array[::-1]
print(array)
s = bytearray("hello")
print(len(s))d = {10: 1}
print(sum(d.popitem()) + sum(d))~ord('Ю') + ord('Я')import numpy as np
A = np.array([[1, 2], [2, 2]])
B = np.linalg.inv(A)
r = sum(np.diag(A@B))
print(r)
s = bytearray("hello", encoding="ascii")d1 = dict.fromkeys(('a', 'b'), 1)
d2 = dict(zip(['c', 'd'], [2, 3]))
d1.update(d2)
print(sum(d1.values()))x, y = ord("A"), ord("А")
print(x << 4 == y)
print(chr(y + 1))