"how to maintain a strict alternating pattern of item ""types"" in a list?","re.sub('(AA+B+)|(ABB+)', '', data)"