0
remove function
https://code.sololearn.com/coU5hRkUDu82/#py why does 'remove' only the first occurring element ??
1 Réponse
+ 3
You can define a function to achieve your task .
def remove(x,y):
for i in range(len(x)):
try:
x.remove(y)
except:
continue
return x
#take (x) argument as list
#and take (y) argument as the string to remove