Decompression and value list

# Extract the value
= L1 [. 1, 2,. 3,. 4] 
A, B, C, D = L1
Print (A, B, C, D)

# decompression value, only the first and last take a
l2 = [1, 2 ,. 3,. 4,. 5,. 6]
a, _ *, b = L2
Print (a, B)

# decompressed value, a = b = 1 to remove the first values of a, c = c except the last one
a, * B, C = L2
Print (B)

Guess you like

Origin www.cnblogs.com/icefoxhz/p/11608252.html