How to delete (remove) an item in specific index of a list using sequence operator as function in Python

1 Answer

0 votes
from operator import *    
 
a = [0, 3, 1, 6, 2, 3, 4, 6, 3]     
b = ['x', 'b', 'a', 'z', 'c', 'a']
c = ['css', 'html', 'python', 'php', 'java', 'php']
 
delitem(a, 1)     
print(a)

delitem(b, 2)  
print(b)

delitem(c, 0)  
print(c)


 
'''
run:
 
[0, 1, 6, 2, 3, 4, 6, 3]
['x', 'b', 'z', 'c', 'a']
['html', 'python', 'php', 'java', 'php']

'''

 



answered May 31, 2019 by avibootz
...