python - convert items within a tuple/list -
i have following list
[(199l, 5l, 247l, 44l), (203l, 5l, 245l, 6l), (219l, 5l, 196l, 6l)]
i use list.extend add [222l, 5l, 227l, 5l]
list becomes
[(199l, 5l, 247l, 44l), (203l, 5l, 245l, 6l), (219l, 5l, 196l, 6l), 222l, 5l, 227l, 5l ]
however in format..
[(199l, 5l, 247l, 44l), (203l, 5l, 245l, 6l), (219l, 5l, 196l, 6l), (222l, 5l, 227l, 5l)]
would know how that..?
you looking list.append()
.
>>> lis = [(199l, 5l, 247l, 44l), (203l, 5l, 245l, 6l), ... (219l, 5l, 196l, 6l)] >>> lis.append((222l, 5l, 227l, 5l)) >>> lis [(199l, 5l, 247l, 44l), (203l, 5l, 245l, 6l), (219l, 5l, 196l, 6l), (222l, 5l, 227l, 5l)]
Comments
Post a Comment