I have tried to use .replace in python to replace an empty list in a string but it is not working. Could anyone please tell me how?
x = ['check-[]|man', 'check-[]|king']
for y in x:
if "[]" in y:
y.replace("[]", "o")
print(y)
The results gave me this despite using .replace:
check-[]|man
check-[]|king