Nov-28-2017, 10:38 PM
>>> lst = [(1,), (2,), (3,), (4,), (5,)] >>> [str(x[0]) for x in lst] ['1', '2', '3', '4', '5'] >>> # If need tuple >>> tuple([str(x[0]) for x in lst]) ('1', '2', '3', '4', '5')
transform list to tuple with
|
|
Messages In This Thread |
transform list to tuple with - by takaa - Nov-28-2017, 10:30 PM
RE: transform list to tuple with - by snippsat - Nov-28-2017, 10:38 PM
RE: transform list to tuple with - by takaa - Nov-28-2017, 10:44 PM
|