+ 1
unpacking tuples
hello everyone, I have a tuple in Python like my_tuple = (a, b, c) how can I unpack it to: a-b-c ???
1 Respuesta
+ 6
x,y,z = (a,b,c)
or
x,*y = (a,b,c)
Google up for more ways
hello everyone, I have a tuple in Python like my_tuple = (a, b, c) how can I unpack it to: a-b-c ???