mm = [[1, 2], ["AB"], [2, 3, 4]]
aa, bb, cc = mm
print(aa, bb, cc)
aa = [99]
cc = ["KK"]
mm = aa, bb, cc # 说明这种赋值方式,只能得到一个元组
print(f"mm的值为:{mm}")
nn = aa, cc
print(f"nn的值为:{nn}")
gg = [aa, cc]
print(f"gg的值为:{gg}")
易错点-python的赋值方式
最新推荐文章于 2024-11-01 20:08:05 发布