废话不说,直接上代码(可能很多人以前不知道有这种方法):
a=[1,2,3]b=(1,2,3)c={1:"a",2:"b",3:"c"}print(a,"====",*a)print(b,"====",*b)print(c,"====",*c) 运行结果为:
[1, 2, 3] ==== 1 2 3
(1, 2, 3) ==== 1 2 3
{1: ‘a‘, 2: ‘b‘, 3: ‘c‘} ==== 1 2 3
原文地址:https://www.cnblogs.com/linwenbin/p/10362811.html
时间: 2024-10-19 17:26:58