+ 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 ???

9th Oct 2022, 5:27 PM
Behrooz Ganji
Behrooz Ganji - avatar
1 Answer
+ 6
x,y,z = (a,b,c) or x,*y = (a,b,c) Google up for more ways
9th Oct 2022, 5:29 PM
Prabhas Koya