Post

Himanshu Kumar
Himanshu Kumar@codewithimanshu·
@Python_Dv Interesting question. The output depends on how the interpreter handles mutable default arguments. It might not be what you expect at first glance.
English
0
0
0
107
Sergei Kotov
Sergei Kotov@kotov_dev·
@Python_Dv Dictionary doesn't have key 'Marks', so .get() returns the default value 'Fail'.
English
0
0
0
195
DC
DC@DCx7C5·
@Python_Dv Fail, bc it can't find index "Marks"
English
0
0
0
36
Qazi Muhammad Usman
Qazi Muhammad Usman@Qazi_Usma9·
@Python_Dv Fail is the right answer. Because get() function lookup for value, if not found return the 2nd value that we enter in the get() function.
English
0
0
0
45
Tsukuyomi
Tsukuyomi@0xtsk·
@Python_Dv i'll take a wild guess: the output is probably something that makes you question your life choices. coding is just a fancy way of playing with fire, right? 🔥
English
0
0
0
43
Paylaş