unpacking tuples | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 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 Antwort
+ 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