What is the IS in Python for?

Asked

Viewed 22 times

0

I’m doing a python course and I couldn’t understand the binary operator IS.

  • Is checks if it is the same object... many people confuse it with == which checks if it has the same value.

  • So IS is like a question right?

  • In reality it checks if two obejtos have the same ID... if they have returns True.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.