I’d start by not calling it list
, since that’s the name of the constructor for Python’s built in list
type.
But once you’ve renamed it to cities
or something, you’d do:
print(cities[0][0], cities[1][0])
print(cities[0][1], cities[1][1])
More Related Contents:
- I don’t know how to display step 3 for this assignment
- How to make a dict from n’th indices of tuples in list
- How do I concatenate items in a list to a single string?
- Is there a zip-like function that pads to longest length?
- Why does this iterative list-growing code give IndexError: list assignment index out of range?
- Different behaviour for list.__iadd__ and list.__add__
- Slicing a list in Python without generating a copy
- Python list doesn’t reflect variable change
- Why is [] faster than list()?
- How can I multiply all items in a list together with Python?
- Remove trailing newline from the elements of a string list
- How to loop through all but the last item of a list?
- Take the content of a list and append it to another list
- Extract elements of list at odd positions
- How to find the maximum value in a list of tuples? [duplicate]
- How does the max() function work on list of strings in python?
- Python: How to remove empty lists from a list? [duplicate]
- How to get the n next values of a generator in a list (python)
- How to convert list of numpy arrays into single numpy array?
- How do I sort this list in Python, if my date is in a String?
- Convert all strings in a list to integers
- How do I send list of dictionary as Body parameter in FastAPI?
- Python Sort One List According to Another List
- Getting indices of True values in a boolean list
- Python: How to sort a list of dictionaries by several values?
- Reading specific columns from a text file in python
- How does str(list) work?
- Filter a list of tuples based on condition
- How can I convert this string to list of lists? [duplicate]
- Removing an item from a list of lists based on each of the lists first element