Ignore part of a python tuple

后端 未结 0 529
温柔的废话
温柔的废话 2021-02-11 12:08

If I have a tuple such as (1,2,3,4) and I want to assign 1 and 3 to variables a and b I could obviously say

myTuple = (1,2,3)
a = my_tuple[0]
b = my         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题