πŸ“Š Python
Q. What will be the output of this code?
Code:
a = {1, 2, 3}
b = {2, 3, 4}
print(a & b)
  • (A) {1, 4}
  • (B) {2, 3}
  • (C) {1, 2, 3, 4}
  • (D) {}
πŸ’¬ Discuss
βœ… Correct Answer: (B) {2, 3}

Explanation: `&` performs set intersection.

Explanation by: Mr. Dubey
`&` performs set intersection.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
45
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
93%
Success Rate