Get answer of your all questions and doubts! ➤
Question
Is it true that if two objects return True for is operator, they will also return True for == operator?
[Computer Science Class – 11 Sumita Arora solutions. Chapter 6 – Data Handling.]
Answer
Yes, if is operator returns True (i.e. both the variables pointing to the same object), hence == operator will also return True.
Related Questions:
- Given str1 = “Hello”, what will be the values of: (a) str1[0] (b) str1[1] (c) str1[-5] (d) str1[-4] (e) str1[5]
- What are three internal key-attributes of a value-variable in Python? Explain with example.
- What will the result given by the following? (a) type (6+3) (b) type (6-3) (c) type (6*3) (d) type (6/3) (e) type (6//3) (f) type (6%3)
- How are these numbers different from one another? 33, 33.0, 33j, 33+j
- Ask or look other questions and answers.