How To Extract Tuple Data into Single Element Format

前端 未结 6 2033
-上瘾入骨i
-上瘾入骨i 2021-01-20 15:48

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 data

6条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-20 16:22

    >>> policy_id = ((2309L,), (118L,), (94L,))
    >>> print("\n".join(str(x[0]) for x in policy_id))
    2309
    118
    94
    

提交回复
热议问题