My question is similar to this, but instead of removing full duplicates I'd like to remove consecutive partial "duplicates" from a list in python.
For my particular use case, I want to remove words from a list that start consecutive with the same character, and I want to be able to define that character. For this example it's #
, so
['#python', 'is', '#great', 'for', 'handling',
'text', '#python', '#text', '#nonsense', '#morenonsense', '.']
should become
['#python', 'is', '#great', 'for', 'handling', 'text', '.']