How To Extract Tuple Data into Single Element Format

python, tuples

Solution

policy_id = ((2309L,), (118L,), (94L,))
for i in policy_id:
    print i[0]  

Problem

I get back good results from the following, but how to I extract that data from the tuple? In other words, how do I clean up the data? Here is the data from the database, I ran out. ``` >>> policy_id = ((2309L,), (118L,), (94L,)) >>> for i in policy_id: print i (2309L,) (118L,) (94L,) ``` But I want the result as: ``` 2309 118 94 ```

Original source