Post

wild-bill-cyber
wild-bill-cyber@Wild_Bill_Cyber·
@Python_Dv Answer: B) [3, 4, 5, 6] a=1, b=2, d=7 the *c scoop grabs everything in the middle → [3,4,5,6] Python’s star unpacking at work
English
0
0
0
1
Sourodip Chatterjee
Sourodip Chatterjee@DipSouro_Chatt·
@Python_Dv c= [3, 4, 5, 6] because → a takes the first element → 1 b takes the second element → 2 d takes the last element → 7 *c collects everything left in the middle → [3, 4, 5, 6]
English
0
0
0
45
JamesofMytikas
JamesofMytikas@jamesofmytikas·
@Python_Dv [3, 4, 5, 6] pythons unpacking feature. The asterisk packs the rest of the iteration that hasnt been assigned a variable. a1, b2, d7.
English
1
0
0
68
Paylaş