You were close. I believe this will do what you want:
p.policy_id = ((2309L,), (118L,), (94L,))
for i in p.policy_id:
print i[0]
yields:
2309
118
94
More Related Contents:
- Python – get unique and sorted values in list of lists [closed]
- How do I count the occurrences of a list item?
- Removing duplicates in lists
- How to sort a list of objects based on an attribute of the objects?
- Pass a list to a function to act as multiple arguments
- How to read a text file into a list or an array with Python
- Python list multiplication: [[…]]*3 makes 3 lists which mirror each other when modified [duplicate]
- How to convert comma-delimited string to list in Python?
- Combining two sorted lists in Python
- Create an empty list with certain size in Python
- Case insensitive ‘in’
- Changing an element in one list changes multiple lists [duplicate]
- Alphabet range in Python
- Python list confusion [duplicate]
- How do I remove the first item from a list?
- How to frame two for loops in list comprehension python
- I want to exception handle ‘list index out of range.’
- Compact way to assign values by slicing list in Python
- How to empty a list?
- how to convert list of dict to dict
- interleaving 2 lists of unequal lengths [duplicate]
- TypeError: list indices must be integers or slices, not list
- Is there a way to efficiently yield every file in a directory containing millions of files?
- Mapping dictionary value to list
- 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
- How to change variables fed into a for loop in list form
- list extend() to index, inserting list elements not only to the end