Python - For each tuple item in list

Introduction

We can always assign manually within the loop to unpack:

Demo

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

for both in T: 
    a, b = both                         # Manual assignment equivalent 
    print(a, b)                         # 2.X: prints with enclosing tuple "()"
#   ww w  .  j av  a2 s .  co  m

Result

Related Example