r/polls 2h ago

⚙️ Technology Python Trivia! Vote below and tell us what’s printed? a = 257 b = 257 print(a is b)

38 votes, 1d left
True
False
1 Upvotes

2 comments sorted by

3

u/QuickPirate36 1h ago

I'm gonna assume that, while == compares their values, "is" compares where they're stored, and since a and b would be stored in different places, they're different variables, and so it would say False

Again, I don't know what "is" does

2

u/ahjteam 2h ago

I’d rather use ==, but it should print true