I have a folder with 300 txt files. lets say the .txt names are a, b, c, d etc. I need to compare each pair with a python script. I need to compare a-b, a-c,a-d, b-c, b-d. I do not want to have a-a and also i don't want to have both a-b and b-a. My guess was something like
for x in ['a', 'b', 'c', 'd']:
for y in ['a', 'b', 'c', 'd']:
if x != y:
print(x , y)
but i am getting both a-b and b-a etc. If i scale it at the 300 file names i will get a few thousands duplicate outputs.
Any suggestions?