output ==> [‘s’, ‘t’, ‘u’, ‘f’, ‘w’, ‘x’, ‘y’, ‘y’]
this is the output I get, how can I get rid of one of the y letters?
>Solution :
You can use the remove() method of the list to remove a specific element by its value. For example:
output = ['s', 't', 'u', 'f', 'w', 'x', 'y', 'y']
output.remove('y')
print(output)