✏️ Explanatory Question

== এবং is operator-এর মধ্যে পার্থক্য ব্যাখ্যা করো।

👁 0 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

== operator value compare করে এবং is operator object identity compare করে।

Example:

a = [1,2]
b = [1,2]

print(a == b)
print(a is b)

Output:

True
False

Explanation:

  • == → same value check করে
  • is → same object check করে
== is
Value compare Memory object compare
Relational operator Identity operator