I have a list like this,
l=[1,1,1,1,2,2,2,3,3,3,3,3,3,4,4,5,6,6,6,5,5,5,7,7,8,8,8,8,8,9,9,9,10,10]
Now I want to select only one values of repeating value continuously, so the output should look like,
l=[1,2,3,4,5,6,5,7,8,9,10]
I could do this using a for loop checking the next values with the previous and append to a list, But the execution time is huge in that case, Looking for shortcuts to do it most efficiently.