>>> a = [(1, u'abc'), (2, u'def')]
>>> [i[0] for i in a]
[1, 2]
More Related Contents:
- How to iterate through two lists in parallel?
- Iterating over every two elements in a list [duplicate]
- What are the advantages of NumPy over regular Python lists?
- Remove all occurrences of a value from a list?
- Are lists thread-safe?
- Iterate through pairs of items in a Python list [duplicate]
- Python List vs. Array – when to use?
- Getting a list of values from a list of dicts
- List vs tuple, when to use each? [duplicate]
- Function changes list values and not variable values in Python [duplicate]
- Extending list returns None [duplicate]
- Interleaving Lists in Python [duplicate]
- Does a slicing operation give me a deep or shallow copy?
- Confused about __str__ on list in Python [duplicate]
- Print LIST of unicode chars without escape characters
- Confusing […] List in Python: What is it?
- How to delete an item in a list if it exists?
- What is time complexity of a list to set conversion?
- How to apply __str__ function when printing a list of objects in Python [duplicate]
- remove None value from a list without removing the 0 value
- Filtering a list based on a list of booleans
- Creating an empty list in Python
- Python: Remove Duplicate Items from Nested list
- Changing one dict changes all dicts in a list of dicts [duplicate]
- Python string.join(list) on object array rather than string array
- Creating sublists [duplicate]
- Can’t sort my list because it is NoneType? Simple Python [duplicate]
- How to sort a list of dictionaries by a value of the dictionary in Python?
- Why Python `Memory Error` with list `append()` lots of RAM left
- Store functions in list and call them later [duplicate]