主页
Python
Python - 解包元组
demo_tuple_unpacking_asterix1
运行 ❯
×
更改方向
保存代码
更改主题
fruits = ("apple", "banana", "cherry", "strawberry", "raspberry") (green, yellow, *red) = fruits print(green) print(yellow) print(red)
apple banana ['cherry', 'strawberry', 'raspberry']