python 将元组解析为多个参数
生活随笔
收集整理的這篇文章主要介紹了
python 将元组解析为多个参数
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
#create a tuple tuplex = 4, 8, 3 print(tuplex) n1, n2, n3 = tuplex #unpack a tuple in variables print(n1 + n2 + n3) #the number of variables must be equal to the number of items of the tuple n1, n2, n3, n4 = tuplex?
轉載于:https://www.cnblogs.com/sea-stream/p/9949563.html
總結
以上是生活随笔為你收集整理的python 将元组解析为多个参数的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 软工作业6
- 下一篇: 笔记:用EXCEL计算收益(复利)