Created
August 3, 2018 22:31
-
-
Save esacteksab/74089bdd6e537e62bca6a2d4746b3c38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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