Articles → Python → Tuple Unpacking In Python

Tuple Unpacking In Python






Example




list = [(1,2) , (3,4), (5,6)]




list = [(1,2) , (3,4), (5,6)]

for (a,b) in list:
    print(a,",",b)



Output


Picture showing the output of tuple unpacking in python



Posted By  -  Karan Gupta
 
Posted On  -  Thursday, March 14, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250