Post

Lumie
Lumie@LumiAnalyst·
@Python_Dv C x = 5 y = x x = x + 2 (5 + 2) = 7 x += x + 4 (x = 7 + 7 + 4) Output: 18
English
0
0
0
366
rootzona
rootzona@rootzona·
@Python_Dv C. 18 7 += 7 + 4 7 += 11 means 7 = 7 + 11 = 18 In short, the "+=" operator means: add the value on the right side to a variable and assign the result to the variable on the left side. So the result is 18.
English
0
0
0
292
Erika S
Erika S@E_FutureFan·
@Python_Dv Mutable default arguments, perhaps? They’re a classic Python gotcha! 👨‍💻 #pythonquirk
English
0
0
0
152
Saad Data-Miner
Saad Data-Miner@SaadR_Biz·
@Python_Dv Looks like C: 18 wins this battle of code! After crunching numbers, x fights its way to 18. Python, you tricky beast! 🤔
English
0
0
0
27
Paylaş