You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
215 B
14 lines
215 B
# Types are hashable
|
|
print(hash(type) != 0)
|
|
print(hash(int) != 0)
|
|
print(hash(list) != 0)
|
|
class Foo: pass
|
|
print(hash(Foo) != 0)
|
|
|
|
print(int == int)
|
|
print(int != list)
|
|
|
|
d = {}
|
|
d[int] = list
|
|
d[list] = int
|
|
print(len(d))
|
|
|