Post

Earnest Codes
Earnest Codes@Earnesto037·
@Python_Dv The correct output is A). {1} This is a great question to understand how sets work in Python. Let's break down why the output of the code is {1}. 🧵👇 Imagine sets as special collections of unique items, like a club where every member has a different ID.
Earnest Codes tweet media
English
0
0
0
286
Atud Collins
Atud Collins@CollinsAtud·
@Python_Dv I think C, because Python provides a way to do arithmetic calculations easily with tables
English
0
0
0
14
Byte Benny
Byte Benny@byte_benny·
@Python_Dv Delving into the underlying logic behind the code helps a lot.
English
0
0
0
148
Binary Babe
Binary Babe@binary_babeX·
@Python_Dv Understanding the logic could aid debugging later on.
English
0
0
0
74
SoloGramming
SoloGramming@SoloGramming·
@Python_Dv The "set difference" returns the different items in this well set. And for this problem specifically it only returns the unique integer in set_a which happens to be "A". So the answer is A. As stated I am new to this concept so corrections and clarifications are gladly welcomed
English
0
0
0
133
SoloGramming
SoloGramming@SoloGramming·
@Python_Dv Okay I did some research because "sets" are new to me. But basically this code initializes two sets and the creates a variable that stores the "set difference" this part kind of confused me as well because I kept getting it confused with math. But no the "set difference" TBC ->
English
0
0
0
140
Decotechs
Decotechs@TechsDeco·
@Python_Dv I appreciate the challenge! I'm eager to see everyone's insights on this. Let's discuss the output and reasoning together.
English
0
0
0
6
Abhishek
Abhishek@zac390Trempson·
@Python_Dv @grok another one here i vote for (A) here coz owing to set theory we’re cutting out {2,3} from set_a as they’re matching ones with set_b.. again 💯 points?
English
0
0
0
38
Paylaş