SyntaxFix
Write A Post
Hire A Developer
Questions
Use tuple unpacking:
>>> pairs = [("a", 1), ("b", 2), ("c", 3)] >>> for a, b in pairs: ... print a, b ... a 1 b 2 c 3
See also: Tuple unpacking in for loops.