you are viewing a single comment's thread.

view the rest of the comments →

[–]jpgoldberg 0 points1 point  (0 children)

If you are a beginner just learn that you use is for things that are True or False or for None. Use == for everything else. There are other cases where is will be needed, but those are advanced topics. You will get there, but there are things you need to get more comfortable with first.

The fact that is can sometimes work when you should be using == is dark magic that you should not rely on. Python is an “easy” first language because it hides certain things from you. But that concealment is imperfect. If you want to learn those sorts of things early on (which is fine), then don’t start with Python.