Skip to content

Instantly share code, notes, and snippets.

@esacteksab
Created August 3, 2018 22:31
Show Gist options
  • Save esacteksab/74089bdd6e537e62bca6a2d4746b3c38 to your computer and use it in GitHub Desktop.
Save esacteksab/74089bdd6e537e62bca6a2d4746b3c38 to your computer and use it in GitHub Desktop.
In [19]: list2 = [("A", 2), ("B", 2), ("C", 3), ("D", 4), ("A", 1)]
In [20]: list2
Out[20]: [('A', 2), ('B', 2), ('C', 3), ('D', 4), ('A', 1)]
In [21]: for i in list2:
...: print(i)
...:
('A', 2)
('B', 2)
('C', 3)
('D', 4)
('A', 1)
In [22]: for i in list2:
...: print(i[0], i[1])
...:
...:
A 2
B 2
C 3
D 4
A 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment