r/PythonLearning • u/clcodingupdates • 16d ago
Discussion What will be the output of the following Python code?
print(sum({1, 2, 2, 3} & {2, 3, 4}))
0
Upvotes
2
u/Sea-Ad7805 16d ago
5
1
u/Makakhan 16d ago
These are the kinds of questions my fellow professors and teachers think are funny to put on tests and see if the can trick their students. Great job answering it tho!
2
u/Sea-Ad7805 15d ago
All those professors and teachers that want you to understand what is really going on when code runs, so annoying.
1
0
4
u/recentAd1666 16d ago
What s the point of this question ? Just type the code in python. If you have more spécific question please ask it clearly.