DS250723 Quiz Doubt :Operators in Python Q8

python certification preparation >> quiz 2 Operators in Python Q8

here I choose the answer as True but it is showing as Wrong - can any one clarify this
I checked online compiler also - it also shows as True only

What if main certification exam quiz also consider correct answer as wrong - May i know solution if happens like that

1 Like

Answer will false.
Because here in SS you can see that memory location for each tuple a and b is defferent.

Thanks

1 Like

@kaushal-ta-ds

Thank you for your reply but you checked based on id but when we print(a is b) - it shows True as output.

so I think it not False

as they asked the what will be output of print(a is b)

@mohammedaliparkar342
can you please check above my query

1 Like

(is) is used to compare the address(id) so for variable a and b the id (address) is different . So the answer is false @prasadbhss

1 Like

@mohammedaliparkar342

I got you point. But my query is when I tried above code in online - is showed as ‘True’
then which should we consider Logic or Output received in online. I shared online output in previous snap

1 Like

Try it in VS CODE or Jupyter

1 Like