How to delete an element at specific index in tuple with Python

1 Answer

0 votes
tpl = (87, 234, 4, 9813, 99)
 
idx = 3
tpl = tpl[ : idx] + tpl[idx + 1 : ]
 
print(tpl)
 
 
 
'''
run:
 
(87, 234, 4, 99)
 
'''

 



answered Jan 29, 2020 by avibootz
...