मराठी

Which of the following operator evaluates to True if the variable on either side of the operator points towards the same memory location and False otherwise? - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Which of the following operator evaluates to True if the variable on either side of the operator points towards the same memory location and False otherwise?

पर्याय

  • is

  • is not

  • and

  • or

MCQ
Advertisements

उत्तर

is

Explanation:

The is operator checks identity, not value. It returns True if both variables refer to the same memory location, and False otherwise.

  • is → same object in memory
  • is not → different objects in memory
  • and, or → logical operators, not identity checks

Hence, the correct option is is.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2024-2025 (March) Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×