I have following list that contains string
data=[]
data.append('BBBB')
data.append('AAAA')
data.append('CCCC')
How can i make my code print the following result? Each line cannot have repeated values like BBBBBBBB.
BBBB
AAAA
CCCC
BBBBAAAA
BBBBCCCC
AAAABBBB
... snippet ...