A
A
albertalexandrov2018-08-28 14:53:25
Python
albertalexandrov, 2018-08-28 14:53:25

True, False, None are singleton objects?

Hey!
When assigning different variables to None, the id function always returns the same address:

a = None
b = None

print(id(a))
print(id(b))

What is the comparison mechanism when using is?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-08-28
@Survtur

Yes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question