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

πŸ‘οΈ
89
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
99%
Success Rate