Answers for "python tuple add value to each element"

2

how to append value in tuple

a = (3,)
b = list(a)
b.append("Work!")
a = tuple(b)
print(a)
Posted by: Guest on July-25-2021
1

add item to tuple python

>>> T1=(10,50,20,9,40,25,60,30,1,56)
>>> L1=list(T1)
>>> L1
[10, 50, 20, 9, 40, 25, 60, 30, 1, 56]
>>> L1.append(100)
>>> T1=tuple(L1)
>>> T1
(10, 50, 20, 9, 40, 25, 60, 30, 1, 56, 100)
Posted by: Guest on January-28-2021

Code answers related to "python tuple add value to each element"

Browse Popular Code Answers by Language