[Python] Unpacking, *identifier / **identifier
Unpacking
x, y, z = coordinates
*iterable
print(1, *[2, 3]) ⇒ 1, 2, 3
print([*[1, 2], *[3, 4]]) ⇒ 1, 2, 3, 4
first, second, *other = customers | first, *middle, last = name
dict_3 = {**dict_1, **dict_2}
*identifier / **identifier
相關例題
Last Updated on 2023/10/02 by A1go