I used the following code
import itertools
f = list(itertools.combinations(['Javad', 'love', 'python'], 2))
print (f)
An I got the following result:
[('Javad', 'love'), ('Javad', 'python'), ('love', 'python')]
I'm looking for a way to transfer them to a csv or excel file as follow: