I have this following code:
from itertools import permutations
a = list(itertools.permutations(['test', 'text', 'new']))
This produces:
[('test', 'text', 'new'),
('test', 'new', 'text'),
('text', 'test', 'new'),
('text', 'new', 'test'),
('new', 'test', 'text'),
('new', 'text', 'test')]
How can do it so that for every row the string is joined and the space between the words are replaced with &. Thus for example the first line in this above list would look like :
test & text & new