АР
Size: a a a
АР
S
JW
S
S
JW
S
ПП
ПП
ПП
ПП
S
ПП
S
ПП
AK
list_1 = [SomeShit(), ShitSome(), ShitShit()]
list_2 = [type ShitShit, type ShitSome, type SomeShit]
JW
>>> i = 1
>>> f = 1.5
>>> s = 'asd'
>>> type(i)
<class 'int'>
>>> type(f)
<class 'float'>
>>> type(s)
<class 'str'>
>>> l1 = [i, f, s]
>>> l2 = [int, float, str]
>>> import collections
>>> collections.Counter(l1)
Counter({1: 1, 1.5: 1, 'asd': 1})
>>> collections.Counter(l2)
Counter({<class 'int'>: 1, <class 'float'>: 1, <class 'str'>: 1})
isinstance()
либо el.__class__.__name__
AK
AK
a = [1, 1.5, 'asd']
b = [int, float, str]
for x, y in zip(a, b):
assert isinstance(x, y)