Algorithms, functions, classes, regular expressions, iterators, generators, OOP, exceptions, NumPy, pandas, scikit-learn
https://telega.in/c/python_tasks
Questions — @dina_ladnyuk
Post #2841
793
PY @python_tasks
Showing posts older than #2842 · Back to latest
arr = [1, 3, "a", 2]
arr.sort()
print(arr)
a = {0, 1, 2}
print(a[1])a = (100, 2)
b = (1, 103)
print(a > b)
a = None
b = None
a is b is None
a = None
print(a is None is True)
from typing import Final
x: Final = 'hi'
x = 'hello'
print(x)
print(1 and 2 and 3)
class A:
x = 1
class B(A):
pass
class C(A):
pass
A.x = 2
B.x = 3
print(B.x, C.x)
import copy
l = [0, 'hi', [1, 2]]
m1 = copy.deepcopy(l)
m2 = copy.copy(l)
print((l[0] is m2[0]), (l[1] is m1[1]), (l[2] is m1[2]))
print(round(8.5), round(8.51), round(9.5), end = ' ')